[FFmpeg-cvslog] qdm2: Check data block size for bytes to bits overflow.
Alex Converse
git at videolan.org
Mon Apr 2 01:45:01 CEST 2012
ffmpeg | branch: release/0.8 | Alex Converse <alex.converse at gmail.com> | Wed Jan 25 15:27:11 2012 -0800| [ccd528cc32024195c0ae1e5420223bff6ffc5317] | committer: Reinhard Tartler
qdm2: Check data block size for bytes to bits overflow.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
(cherry picked from commit dac56d9ce01eb9963f28f26b97a81db5cbd46c1c)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ccd528cc32024195c0ae1e5420223bff6ffc5317
---
libavcodec/qdm2.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 7e7051f..184c97d 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -1816,6 +1816,10 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
extradata += 4;
s->checksum_size = AV_RB32(extradata);
+ if (s->checksum_size >= 1U << 28) {
+ av_log(avctx, AV_LOG_ERROR, "data block size too large (%u)\n", s->checksum_size);
+ return AVERROR_INVALIDDATA;
+ }
s->fft_order = av_log2(s->fft_size) + 1;
s->fft_frame_size = 2 * s->fft_size; // complex has two floats
More information about the ffmpeg-cvslog
mailing list