asrc_aevalsrc: Fix use of uninitialized pointer inside av_strtok()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 01:00:34 +0000 (03:00 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 01:00:34 +0000 (03:00 +0200)
Fixes CID733842
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/asrc_aevalsrc.c

index 71eadfc..c8b5e02 100644 (file)
@@ -91,6 +91,12 @@ static int init(AVFilterContext *ctx, const char *args)
     eval->class = &aevalsrc_class;
     av_opt_set_defaults(eval);
 
+    if (!args1) {
+        av_log(ctx, AV_LOG_ERROR, "Argument is empty\n");
+        ret = args ? AVERROR(ENOMEM) : AVERROR(EINVAL);
+        goto end;
+    }
+
     /* parse expressions */
     buf = args1;
     i = 0;