Fixed off by one packet size allocation in the smacker demuxer.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 12 Sep 2011 18:50:34 +0000 (20:50 +0200)
committerReinhard Tartler <siretart@tauware.de>
Mon, 26 Sep 2011 17:26:32 +0000 (19:26 +0200)
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit a92d0fa5d234582583d41b67dddecffc2c819573)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/smacker.c

index 87c59a3..a817c31 100644 (file)
@@ -306,7 +306,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
         }
         if (frame_size < 0)
             return AVERROR_INVALIDDATA;
-        if (av_new_packet(pkt, frame_size + 768))
+        if (av_new_packet(pkt, frame_size + 769))
             return AVERROR(ENOMEM);
         if(smk->frm_size[smk->cur_frame] & 1)
             palchange |= 2;