projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d92802
)
smacker: Avoid integer overflow when allocating packets
author
Martin Storsjö
<martin@martin.st>
Wed, 11 Sep 2013 12:25:13 +0000
(15:25 +0300)
committer
Martin Storsjö
<martin@martin.st>
Wed, 11 Sep 2013 17:19:43 +0000
(20:19 +0300)
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/smacker.c
patch
|
blob
|
history
diff --git
a/libavformat/smacker.c
b/libavformat/smacker.c
index
a15bded
..
f8a0769
100644
(file)
--- a/
libavformat/smacker.c
+++ b/
libavformat/smacker.c
@@
-327,7
+327,7
@@
static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
}
flags >>= 1;
}
- if (frame_size < 0)
+ if (frame_size < 0
|| frame_size >= INT_MAX/2
)
return AVERROR_INVALIDDATA;
if (av_new_packet(pkt, frame_size + 769))
return AVERROR(ENOMEM);