]> 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)
commit52e00c9cd523dab9c84224fe898e56184d7ad03d
tree3581be5ed3b84b93541d952185b5a12567527e6a
parent2e906b7966a8c99bd6eb3b193147a23bd36560e6
ALSA: pcm: oss: Place the plugin buffer overflow checks correctly

The checks of the plugin buffer overflow in the previous fix by commit
  5028daa3ed6b ("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: 5028daa3ed6b ("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