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:
295218f
)
flvdec: check return value of create_stream()
author
Paul B Mahol
<onemda@gmail.com>
Mon, 15 Oct 2012 15:59:53 +0000
(15:59 +0000)
committer
Paul B Mahol
<onemda@gmail.com>
Mon, 15 Oct 2012 15:59:53 +0000
(15:59 +0000)
Fixes null pointer dereference. Fixes CID732242.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/flvdec.c
patch
|
blob
|
history
diff --git
a/libavformat/flvdec.c
b/libavformat/flvdec.c
index
8c6807a
..
24302f6
100644
(file)
--- a/
libavformat/flvdec.c
+++ b/
libavformat/flvdec.c
@@
-730,6
+730,8
@@
static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
av_log(s, AV_LOG_WARNING, "Stream discovered after head already parsed\n");
st = create_stream(s,
(int[]){AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO, AVMEDIA_TYPE_DATA}[stream_type]);
+ if (!st)
+ return AVERROR(ENOMEM);
}
av_dlog(s, "%d %X %d \n", stream_type, flags, st->discard);