Browse Source

img2dec: check return value of av_new_packet()

Fixes CID703626.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n1.1
Paul B Mahol 13 years ago
parent
commit
3f8148911c
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/img2dec.c

+ 2
- 1
libavformat/img2dec.c View File

@@ -375,7 +375,8 @@ static int read_packet(AVFormatContext *s1, AVPacket *pkt)
size[0]= 4096;
}

av_new_packet(pkt, size[0] + size[1] + size[2]);
if (av_new_packet(pkt, size[0] + size[1] + size[2]) < 0)
return AVERROR(ENOMEM);
pkt->stream_index = 0;
pkt->flags |= AV_PKT_FLAG_KEY;



Loading…
Cancel
Save