git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d2e6e8
)
Handle the case where we do not have enough input
author
Vitor Sessak
<vitor1001@gmail.com>
Sat, 24 May 2008 16:20:37 +0000
(16:20 +0000)
committer
Vitor Sessak
<vitor1001@gmail.com>
Sat, 24 May 2008 16:20:37 +0000
(16:20 +0000)
Originally committed as revision 13282 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/ra144.c
patch
|
blob
|
history
diff --git
a/libavcodec/ra144.c
b/libavcodec/ra144.c
index
5fd2a24
..
5cfe94f
100644
(file)
--- a/
libavcodec/ra144.c
+++ b/
libavcodec/ra144.c
@@
-343,9
+343,11
@@
static int ra144_decode_frame(AVCodecContext * avctx,
Real144_internal *glob = avctx->priv_data;
GetBitContext gb;
- if(buf_size == 0)
- return 0;
-
+ if(buf_size < 20) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Frame too small (%d bytes). Truncated file?\n", buf_size);
+ return buf_size;
+ }
init_get_bits(&gb, buf, 20 * 8);
for (i=0; i<10; i++)