git.videolan.org
/
ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
avcodec/msrle: Check that the input is large enough to contain a end of picture code
[ffmpeg.git]
/
libavcodec
/
msrle.c
diff --git
a/libavcodec/msrle.c
b/libavcodec/msrle.c
index
adb55b1
..
1ab8a41
100644
(file)
--- a/
libavcodec/msrle.c
+++ b/
libavcodec/msrle.c
@@
-95,6
+95,9
@@
static int msrle_decode_frame(AVCodecContext *avctx,
s->buf = buf;
s->size = buf_size;
+ if (buf_size < 2) //Minimally a end of picture code should be there
+ return AVERROR_INVALIDDATA;
+
if ((ret = ff_reget_buffer(avctx, s->frame)) < 0)
return ret;