diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-10-15 15:20:40 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-10-15 17:03:41 +0000 |
commit | bb502411ddb9fe1928d4a999693a3a49b83f8698 (patch) | |
tree | c3f206f61242a0953d3a2af47f99bf30c7df5e23 /libavformat | |
parent | 8cbb8f53575d40a26d5b1d065acb0a85bbb15e74 (diff) | |
download | ffmpeg-bb502411ddb9fe1928d4a999693a3a49b83f8698.tar.gz |
nutdec: check return value of av_new_packet()
Fixes CID733173.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/nutdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index cc18adc97d..492d5c83dc 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -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); |