mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
a6aa7e039a
commit
8cac86e091
|
@ -1411,7 +1411,7 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (vr_type == 2) {
|
} 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;
|
unsigned voffs_mod = voffset - voffs_div * ch;
|
||||||
|
|
||||||
for (k = 0; k < step; ++k) {
|
for (k = 0; k < step; ++k) {
|
||||||
|
|
Loading…
Reference in New Issue