]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: oss: Place the plugin buffer overflow checks correctly
authorTakashi Iwai <tiwai@suse.de>
Fri, 24 Apr 2020 19:33:50 +0000 (21:33 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 24 Apr 2020 19:34:52 +0000 (21:34 +0200)
commitd69c8a157ef83d5f2e53ef03fa58266ec536e143
tree3581be5ed3b84b93541d952185b5a12567527e6a
parent1d86aebfb917326ecd889c729163c2951cce8fd5
ALSA: pcm: oss: Place the plugin buffer overflow checks correctly

The checks of the plugin buffer overflow in the previous fix by commit
  2a86cec927f1 ("ALSA: pcm: oss: Avoid plugin buffer overflow")
are put in the wrong places mistakenly, which leads to the expected
(repeated) sound when the rate plugin is involved.  Fix in the right
places.

Also, at those right places, the zero check is needed for the
termination node, so added there as well, and let's get it done,
finally.

Fixes: 2a86cec927f1 ("ALSA: pcm: oss: Avoid plugin buffer overflow")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200424193350.19678-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_plugin.c