Просмотр исходного кода

ffprobe: fix crash in case -of is specified with an empty string

Fix trac issue #5957.
Stefano Sabatini 8 лет назад
Родитель
Сommit
427a47abcd
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      ffprobe.c

+ 6 - 0
ffprobe.c

@@ -3311,6 +3311,12 @@ int main(int argc, char **argv)
         goto end;
     }
     w_name = av_strtok(print_format, "=", &buf);
+    if (!w_name) {
+        av_log(NULL, AV_LOG_ERROR,
+               "No name specified for the output format\n");
+        ret = AVERROR(EINVAL);
+        goto end;
+    }
     w_args = buf;
 
     if (show_data_hash) {