OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
011f389
)
img2dec: check return value of av_new_packet()
author
Paul B Mahol
<onemda@gmail.com>
Mon, 15 Oct 2012 14:53:56 +0000
(14:53 +0000)
committer
Paul B Mahol
<onemda@gmail.com>
Mon, 15 Oct 2012 14:53:56 +0000
(14:53 +0000)
Fixes CID703626.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/img2dec.c
patch
|
blob
|
history
diff --git
a/libavformat/img2dec.c
b/libavformat/img2dec.c
index
79f10b9
..
c493f1a
100644
(file)
--- 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;