summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-15 00:49:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-15 01:33:17 +0200
commit86a9370e2b91d67375e66a06d6eb573b5a017775 (patch)
tree748ee56ff7e11e73648642d50a18a24f423f4b40
parentada8f9c046c80e0c7fe0d3cc56a466ad340d5658 (diff)
avformat/mpc: attempt to allocate a packet that is not smaller than the data inside it
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 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;