1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-20 16:25:04 +02:00

vorbisdec: fix heap buffer overflow.

Found-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-08-02 12:21:25 +02:00
parent a6aa7e039a
commit 8cac86e091

View File

@ -1411,7 +1411,7 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
}
} else if (vr_type == 2) {
unsigned voffs_div = FASTDIV(voffset, ch);
unsigned voffs_div = ch == 1 ? voffset : FASTDIV(voffset, ch);
unsigned voffs_mod = voffset - voffs_div * ch;
for (k = 0; k < step; ++k) {