mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
nutdec: check return value of av_new_packet()
Fixes CID733173. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
8cbb8f5357
commit
bb502411dd
@ -854,7 +854,8 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code)
|
||||
return 1;
|
||||
}
|
||||
|
||||
av_new_packet(pkt, size + nut->header_len[header_idx]);
|
||||
if (av_new_packet(pkt, size + nut->header_len[header_idx]) < 0)
|
||||
return AVERROR(ENOMEM);
|
||||
memcpy(pkt->data, nut->header[header_idx], nut->header_len[header_idx]);
|
||||
pkt->pos = avio_tell(bc); // FIXME
|
||||
avio_read(bc, pkt->data + nut->header_len[header_idx], size);
|
||||
|
Loading…
Reference in New Issue
Block a user