aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-15 00:49:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-25 16:35:25 +0200
commit1e9ae5dbbd676b53906d3340b5acaf0e77cb6d00 (patch)
tree93f63fedd7518a82a26631df0ea7005827ffbf6a
parent01e2dd53a0672e21d715f664b1a8d2eeee2a4e5d (diff)
downloadffmpeg-1e9ae5dbbd676b53906d3340b5acaf0e77cb6d00.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>
-rw-r--r--libavformat/mpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpc.c b/libavformat/mpc.c
index b0f6f533e1..a46919ba36 100644
--- a/libavformat/mpc.c
+++ b/libavformat/mpc.c
@@ -153,7 +153,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;