Browse code

avformat/mpc: attempt to allocate a packet that is not smaller than the data inside it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 86a9370e2b91d67375e66a06d6eb573b5a017775)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2014/06/15 07:49:02
Showing 1 changed files
... ...
@@ -153,7 +153,7 @@ static int mpc_read_packet(AVFormatContext *s, AVPacket *pkt)
153 153
     }
154 154
     c->curbits = (curbits + size2) & 0x1F;
155 155
 
156
-    if ((ret = av_new_packet(pkt, size)) < 0)
156
+    if ((ret = av_new_packet(pkt, size + 4)) < 0)
157 157
         return ret;
158 158
 
159 159
     pkt->data[0] = curbits;