[FFmpeg-cvslog] avformat/mpc: attempt to allocate a packet that is not smaller than the data inside it

Michael Niedermayer git at videolan.org
Sun Jul 20 19:17:07 CEST 2014


ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 15 00:49:02 2014 +0200| [8f443e4f32c91dc2141b6d0c997a2fe03536e89c] | committer: Michael Niedermayer

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

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

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f443e4f32c91dc2141b6d0c997a2fe03536e89c
---

 libavformat/mpc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpc.c b/libavformat/mpc.c
index 3b818ed..b936811 100644
--- a/libavformat/mpc.c
+++ b/libavformat/mpc.c
@@ -151,7 +151,7 @@ static int mpc_read_packet(AVFormatContext *s, AVPacket *pkt)
     }
     c->curbits = (curbits + size2) & 0x1F;
 
-    if ((ret = av_new_packet(pkt, size)) < 0)
+    if ((ret = av_new_packet(pkt, size + 4)) < 0)
         return ret;
 
     pkt->data[0] = curbits;



More information about the ffmpeg-cvslog mailing list