[FFmpeg-cvslog] smacker: sanity check audio size.
Michael Niedermayer
git at videolan.org
Sat Nov 24 18:09:00 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov 24 18:02:08 2012 +0100| [57c0da6fe4ebd7c2d58a28248d84a18d45fce0ee] | committer: Michael Niedermayer
smacker: sanity check audio size.
Fixes, excessive memory allocation
Fixes Ticket1892
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57c0da6fe4ebd7c2d58a28248d84a18d45fce0ee
---
libavcodec/smacker.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index f4cc6ae..dbcbbd5 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -608,6 +608,11 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
unp_size = AV_RL32(buf);
+ if (unp_size > (1U<<24)) {
+ av_log(avctx, AV_LOG_ERROR, "packet is too big\n");
+ return AVERROR_INVALIDDATA;
+ }
+
init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);
if(!get_bits1(&gb)){
More information about the ffmpeg-cvslog
mailing list