diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-12 20:50:13 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-09-12 23:43:52 +0300 |
commit | e055932f5636a82275837968eea9c8fcb5bca474 (patch) | |
tree | 6495b6f6c5c05248f9c424502ac43609eed15f39 /libavformat/smacker.c | |
parent | 273aab99bf7be2bcda95dd64101c2317ee0fcb99 (diff) | |
download | ffmpeg-e055932f5636a82275837968eea9c8fcb5bca474.tar.gz |
Check for invalid packet size in the smacker demuxer.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/smacker.c')
-rw-r--r-- | libavformat/smacker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c index 274946696c..cff1af6eee 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -304,6 +304,8 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt) } flags >>= 1; } + if (frame_size < 0) + return AVERROR_INVALIDDATA; if (av_new_packet(pkt, frame_size + 768)) return AVERROR(ENOMEM); if(smk->frm_size[smk->cur_frame] & 1) |