diff options
author | Martin Storsjö <martin@martin.st> | 2013-09-11 15:25:13 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-09-11 20:19:43 +0300 |
commit | 710b0e27025948b7511821c2f888ff2d74a59e14 (patch) | |
tree | 40b3d89b1037488da994e19fb27f1ec71d64c519 | |
parent | 8d928023f953a28692ba27071a448259134b103b (diff) | |
download | ffmpeg-710b0e27025948b7511821c2f888ff2d74a59e14.tar.gz |
smacker: Avoid integer overflow when allocating packets
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/smacker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c index a15bded119..f8a0769acd 100644 --- 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); |