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:
8cbb8f5
)
nutdec: check return value of av_new_packet()
author
Paul B Mahol
<onemda@gmail.com>
Mon, 15 Oct 2012 15:20:40 +0000
(15:20 +0000)
committer
Paul B Mahol
<onemda@gmail.com>
Mon, 15 Oct 2012 17:03:41 +0000
(17:03 +0000)
Fixes CID733173.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/nutdec.c
patch
|
blob
|
history
diff --git
a/libavformat/nutdec.c
b/libavformat/nutdec.c
index
cc18adc
..
492d5c8
100644
(file)
--- a/
libavformat/nutdec.c
+++ b/
libavformat/nutdec.c
@@
-854,7
+854,8
@@
static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code)
return 1;
}
- av_new_packet(pkt, size + nut->header_len[header_idx]);
+ if (av_new_packet(pkt, size + nut->header_len[header_idx]) < 0)
+ return AVERROR(ENOMEM);
memcpy(pkt->data, nut->header[header_idx], nut->header_len[header_idx]);
pkt->pos = avio_tell(bc); // FIXME
avio_read(bc, pkt->data + nut->header_len[header_idx], size);