diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-12 11:38:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-12 11:39:18 +0200 |
commit | c16cd555934999a22d1f0a87d4ceea2b31ccefe6 (patch) | |
tree | 750ffdd28ca08cea1300972b8d5da5ad86f18aa1 /libavformat/smacker.c | |
parent | 33cf70a8b88cebdeee745b3a9c7b4f164d7497f8 (diff) | |
parent | 710b0e27025948b7511821c2f888ff2d74a59e14 (diff) | |
download | ffmpeg-c16cd555934999a22d1f0a87d4ceea2b31ccefe6.tar.gz |
Merge commit '710b0e27025948b7511821c2f888ff2d74a59e14'
* commit '710b0e27025948b7511821c2f888ff2d74a59e14':
smacker: Avoid integer overflow when allocating packets
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/smacker.c')
-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 b219153513..65440c9c57 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -331,7 +331,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); |