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-23 16:51:09 +0200
commit9790ed63fcd2cea3704b155ecd040a85527e84aa (patch)
treedc85a1a646a487a298f759bb9ec1fa2562a2034c
parent0e3a1d60d3935d5cd0ce04b7e04572d32d528e68 (diff)
downloadffmpeg-9790ed63fcd2cea3704b155ecd040a85527e84aa.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 8abc488553..06b4b450b1 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;