ffprobe: fix use of uninitialized pointer in av_strtok()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 01:33:34 +0000 (03:33 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 01:37:43 +0000 (03:37 +0200)
Fixes CID733837
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffprobe.c

index 2187ce2..1cf6c42 100644 (file)
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -2143,6 +2143,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;