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 86a9370e2b)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0e3a1d60d3
commit
9790ed63fc
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue