diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-02 12:21:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-02 12:22:19 +0200 |
commit | 8cac86e091118dab5a7463cb6119c940a6b8940c (patch) | |
tree | aaec703af912e6693fa6fba3b2b047c436d38bc8 /libavcodec/vorbisdec.c | |
parent | a6aa7e039a63362b4c8f6919a2ff2244202df1be (diff) | |
download | ffmpeg-8cac86e091118dab5a7463cb6119c940a6b8940c.tar.gz |
vorbisdec: fix heap buffer overflow.
Found-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vorbisdec.c')
-rw-r--r-- | libavcodec/vorbisdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 4ddd978b12..34ba7ba903 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -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) { |