Skip to content
Snippets Groups Projects
Commit adc61d68 authored by Paul B Mahol's avatar Paul B Mahol
Browse files

bit: check av_new_packet() return value


Fixes CID703626.

Signed-off-by: default avatarPaul B Mahol <onemda@gmail.com>
parent ca28cb5f
No related branches found
No related tags found
No related merge requests found
...@@ -90,7 +90,8 @@ static int read_packet(AVFormatContext *s, ...@@ -90,7 +90,8 @@ static int read_packet(AVFormatContext *s,
if(ret != 8 * packet_size * sizeof(uint16_t)) if(ret != 8 * packet_size * sizeof(uint16_t))
return AVERROR(EIO); 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); init_put_bits(&pbo, pkt->data, packet_size);
for(j=0; j < packet_size; j++) for(j=0; j < packet_size; j++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment