aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-10-15 14:53:56 +0000
committerPaul B Mahol <onemda@gmail.com>2012-10-15 14:53:56 +0000
commit3f8148911c6e6e1f2a042bd4ca3ad8516a92130c (patch)
tree98d2a0eaa412882e364bd234c97d9a8db3fc2367
parent011f3892ff3533c0b1157fdc614362ab31b2fe8f (diff)
downloadffmpeg-3f8148911c6e6e1f2a042bd4ca3ad8516a92130c.tar.gz
img2dec: check return value of av_new_packet()
Fixes CID703626. Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavformat/img2dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 79f10b9f7f..c493f1add7 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -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;