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:
3f81489
)
idcin: check chunk_size value before using it
author
Paul B Mahol
<onemda@gmail.com>
Mon, 15 Oct 2012 15:48:13 +0000
(15:48 +0000)
committer
Paul B Mahol
<onemda@gmail.com>
Mon, 15 Oct 2012 15:48:13 +0000
(15:48 +0000)
Fixes integer overflow. Fixes CID732223.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/idcin.c
patch
|
blob
|
history
diff --git
a/libavformat/idcin.c
b/libavformat/idcin.c
index
f1df002
..
bede040
100644
(file)
--- a/
libavformat/idcin.c
+++ b/
libavformat/idcin.c
@@
-256,6
+256,8
@@
static int idcin_read_packet(AVFormatContext *s,
chunk_size = avio_rl32(pb);
/* skip the number of decoded bytes (always equal to width * height) */
avio_skip(pb, 4);
+ if (chunk_size < 4)
+ return AVERROR_INVALIDDATA;
chunk_size -= 4;
ret= av_get_packet(pb, pkt, chunk_size);
if (ret < 0)