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
(from parent 1:
87588ca
)
avcodec/msrle: Check that the input is large enough to contain a end of picture code
author
Michael Niedermayer
<michael@niedermayer.cc>
Sun, 21 Oct 2018 12:40:14 +0000
(14:40 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Wed, 24 Oct 2018 21:15:24 +0000
(23:15 +0200)
Fixes: Timeout
Fixes: 10625/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSRLE_fuzzer-
5659651283091456
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/msrle.c
patch
|
blob
|
history
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;