[FFmpeg-cvslog] ffprobe: fix use of uninitialized pointer in av_strtok()

Michael Niedermayer git at videolan.org
Thu Oct 25 21:29:17 CEST 2012


ffmpeg | branch: release/0.10 | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 11 03:33:34 2012 +0200| [7450a0215ae2242e497a334eef788b1acb581e7e] | committer: Michael Niedermayer

ffprobe: fix use of uninitialized pointer in av_strtok()

Fixes CID733837
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 4334ba043e9601717af3a7ca46addfaf154d5fb6)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7450a0215ae2242e497a334eef788b1acb581e7e
---

 ffprobe.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ffprobe.c b/ffprobe.c
index ca6133e..48c813a 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1790,6 +1790,10 @@ int main(int argc, char **argv)
 
     if (!print_format)
         print_format = av_strdup("default");
+    if (!print_format) {
+        ret = AVERROR(ENOMEM);
+        goto end;
+    }
     w_name = av_strtok(print_format, "=", &buf);
     w_args = buf;
 



More information about the ffmpeg-cvslog mailing list