diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-10-26 15:31:00 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-10-26 15:34:25 +0000 |
commit | adc61d68b02cf91b594400e502c7786da1e02e11 (patch) | |
tree | 06180c15011da7887c0971ff06a8b6efdb2c6258 | |
parent | ca28cb5f8388e87751644999cb6350068987549b (diff) | |
download | ffmpeg-adc61d68b02cf91b594400e502c7786da1e02e11.tar.gz |
bit: check av_new_packet() return value
Fixes CID703626.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavformat/bit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/bit.c b/libavformat/bit.c index 03c6152c5d..9f6ea4a415 100644 --- a/libavformat/bit.c +++ b/libavformat/bit.c @@ -90,7 +90,8 @@ static int read_packet(AVFormatContext *s, if(ret != 8 * packet_size * sizeof(uint16_t)) return AVERROR(EIO); - av_new_packet(pkt, packet_size); + if (av_new_packet(pkt, packet_size) < 0) + return AVERROR(ENOMEM); init_put_bits(&pbo, pkt->data, packet_size); for(j=0; j < packet_size; j++) |