[SCM] libav/experimental: Check available size before writing in decode_frame()
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:27:03 UTC 2013
The following commit has been merged in the experimental branch:
commit 438abdaaeb59d88cacddf4e8b567c3b2629f34f2
Author: Vitor Sessak <vitor1001 at gmail.com>
Date: Wed Aug 6 05:06:10 2008 +0000
Check available size before writing in decode_frame()
Originally committed as revision 14637 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index fc99655..649dfac 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -315,6 +315,9 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *vdata,
RA144Context *ractx = avctx->priv_data;
GetBitContext gb;
+ if (*data_size < 2*160)
+ return -1;
+
if(buf_size < 20) {
av_log(avctx, AV_LOG_ERROR,
"Frame too small (%d bytes). Truncated file?\n", buf_size);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list