OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7865759
)
avcodec/hnm4video: check that packetsize is at least 8
author
Michael Niedermayer
<michaelni@gmx.at>
Fri, 22 Nov 2013 15:37:50 +0000
(16:37 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 22 Nov 2013 16:02:00 +0000
(17:02 +0100)
Fixes integer overflow and assertion failure
Fixes: signal_sigabrt_7ffff7126425_1243_CASSE.HNM
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hnm4video.c
patch
|
blob
|
history
diff --git
a/libavcodec/hnm4video.c
b/libavcodec/hnm4video.c
index
1e3c0fd
..
d2c4ce3
100644
(file)
--- a/
libavcodec/hnm4video.c
+++ b/
libavcodec/hnm4video.c
@@
-359,6
+359,11
@@
static int hnm_decode_frame(AVCodecContext *avctx, void *data,
int ret;
uint16_t chunk_id;
+ if (avpkt->size < 8) {
+ av_log(avctx, AV_LOG_ERROR, "packet too small\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
return ret;