[FFmpeg-cvslog] segment: fix NULL pointer dereference in seg_write_header()
Xi Wang
git at videolan.org
Thu Nov 15 11:29:34 CET 2012
ffmpeg | branch: master | Xi Wang <xi.wang at gmail.com> | Wed Nov 14 02:52:32 2012 -0500| [e8769b37fe8a841c0d28d3686c6d3cdecc542bc7] | committer: Martin Storsjö
segment: fix NULL pointer dereference in seg_write_header()
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 at gmail.com>
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e8769b37fe8a841c0d28d3686c6d3cdecc542bc7
---
libavformat/segment.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/segment.c b/libavformat/segment.c
index fd52835..8afb41f 100644
--- 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;
}
More information about the ffmpeg-cvslog
mailing list