diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-15 00:49:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-23 15:56:15 +0200 |
commit | d07be523f5d8e2184b581c564e1b5e00440c5dc2 (patch) | |
tree | 63abcc9d92ec5babb929d1ecd904455eca4fedc3 /libavformat/mpc.c | |
parent | e4cdde96b381f2b92ff65ce4793840f82b414157 (diff) | |
download | ffmpeg-d07be523f5d8e2184b581c564e1b5e00440c5dc2.tar.gz |
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>
Diffstat (limited to 'libavformat/mpc.c')
-rw-r--r-- | libavformat/mpc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpc.c b/libavformat/mpc.c index c3faebe6c0..8f8ac9c389 100644 --- a/libavformat/mpc.c +++ b/libavformat/mpc.c @@ -152,7 +152,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; |