1
0
Fork 0
alistair23-linux/sound/core/oss
Takashi Iwai 0bf907442c ALSA: pcm: oss: Fix a few more UBSAN fixes
commit 11cb881bf0 upstream.

There are a few places that call round{up|down}_pow_of_two() with the
value zero, and this causes undefined behavior warnings.  Avoid
calling those macros if such a nonsense value is passed; it's a minor
optimization as well, as we handle it as either an error or a value to
be skipped, instead.

Reported-by: syzbot+33ef0b6639a8d2d42b4c@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201218161730.26596-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:33 +01: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 ALSA: Kill snd_assert() in sound/core/* 2008-08-13 11:46:35 +02:00
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: Remove superfluous WARN_ON() for mulaw sanity check 2020-09-09 19:12:32 +02:00
pcm_oss.c ALSA: pcm: oss: Fix a few more UBSAN fixes 2020-12-30 11:51:33 +01: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