1
0
Fork 0
alistair23-linux/sound/core/oss
Takashi Iwai ea63e38b29 ALSA: pcm: oss: Place the plugin buffer overflow checks correctly
commit 4285de0725 upstream.

The checks of the plugin buffer overflow in the previous fix by commit
  f2ecf903ef ("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: f2ecf903ef ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-06 08:15:08 +02:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
copy.c
io.c ALSA: pcm: Build OSS writev/readv helpers conditionally 2017-06-02 19:38:26 +02:00
linear.c ALSA: pcm: oss: Avoid potential buffer overflows 2019-12-13 08:42:38 +01:00
mixer_oss.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
mulaw.c ALSA: pcm: oss: Avoid potential buffer overflows 2019-12-13 08:42:38 +01:00
pcm_oss.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pcm_plugin.c ALSA: pcm: oss: Place the plugin buffer overflow checks correctly 2020-05-06 08:15:08 +02:00
pcm_plugin.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
rate.c ALSA: pcm: oss: Use struct_size() helper 2019-05-24 07:59:19 +02:00
route.c ALSA: pcm: oss: Avoid potential buffer overflows 2019-12-13 08:42:38 +01:00