Skip to content
Commit ae769d35 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: pcm: oss: Fix regression by buffer overflow fix

The recent fix for the OOB access in PCM OSS plugins (commit
f2ecf903: "ALSA: pcm: oss: Avoid plugin buffer overflow") caused a
regression on OSS applications.  The patch introduced the size check
in client and slave size calculations to limit to each plugin's buffer
size, but I overlooked that some code paths call those without
allocating the buffer but just for estimation.

This patch fixes the bug by skipping the size check for those code
paths while keeping checking in the actual transfer calls.

Fixes: f2ecf903

 ("ALSA: pcm: oss: Avoid plugin buffer overflow")
Tested-and-reported-by: default avatarJari Ruusu <jari.ruusu@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200403072515.25539-1-tiwai@suse.de
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5461e053
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment