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)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 3 Nov 2011 02:27:39 +0000 (03:27 +0100)
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 fa4f631..a34dfde 100644 (file)
@@ -294,7 +294,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;