summaryrefslogtreecommitdiff
path: root/libavcodec/ra144.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-08-06 05:06:10 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-08-06 05:06:10 +0000
commit438abdaaeb59d88cacddf4e8b567c3b2629f34f2 (patch)
treee633926ec97f4eb214adcda4492003f90e648ab3 /libavcodec/ra144.c
parent8089c652a79092449d3e63848f9f8ed52c8e8666 (diff)
Check available size before writing in decode_frame()
Originally committed as revision 14637 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ra144.c')
-rw-r--r--libavcodec/ra144.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index fc99655e80..649dfac33e 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);