[FFmpeg-cvslog] avcodec/wmaprodec: Fix integer overflow in sfb_offsets initialization
Michael Niedermayer
git at videolan.org
Sun Dec 21 04:50:31 CET 2014
ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 10 23:07:50 2014 +0100| [b4f08f34a852a52a6cf11b490e7a66357132abb6] | committer: Michael Niedermayer
avcodec/wmaprodec: Fix integer overflow in sfb_offsets initialization
Fixes out of array read
Fixes: asan_heap-oob_2aec5b0_1828_classical_22_16_2_16000_v3c_0_exclusive_0_29.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 5dcb99033df16eccc4dbbc4a099ad64457f9f090)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4f08f34a852a52a6cf11b490e7a66357132abb6
---
libavcodec/wmaprodec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 0878b5f..ce92c7f 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -419,6 +419,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
offset &= ~3;
if (offset > s->sfb_offsets[i][band - 1])
s->sfb_offsets[i][band++] = offset;
+
+ if (offset >= subframe_len)
+ break;
}
s->sfb_offsets[i][band - 1] = subframe_len;
s->num_sfb[i] = band - 1;
More information about the ffmpeg-cvslog
mailing list