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:
26301ca
)
segment: fix NULL pointer dereference in seg_write_header()
author
Xi Wang
<xi.wang@gmail.com>
Wed, 14 Nov 2012 07:52:32 +0000
(
02:52
-0500)
committer
Martin Storsjö
<martin@martin.st>
Wed, 14 Nov 2012 10:33:27 +0000
(12:33 +0200)
Since the pointer `oc' is NULL, oc->oformat->name will cause a null
pointer dereference. This patch changes it to seg->oformat->name.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/segment.c
patch
|
blob
|
history
diff --git
a/libavformat/segment.c
b/libavformat/segment.c
index
fd52835
..
8afb41f
100644
(file)
--- a/
libavformat/segment.c
+++ b/
libavformat/segment.c
@@
-210,7
+210,7
@@
static int seg_write_header(AVFormatContext *s)
}
if (seg->oformat->flags & AVFMT_NOFILE) {
av_log(s, AV_LOG_ERROR, "format %s not supported.\n",
-
oc
->oformat->name);
+
seg
->oformat->name);
ret = AVERROR(EINVAL);
goto fail;
}