ffprobe: fix use of uninitialized pointer in av_strtok()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2012-10-11 03:33:34 +02:00
parent ba10ea845f
commit 7450a0215a

View File

@@ -1790,6 +1790,10 @@ int main(int argc, char **argv)
if (!print_format) if (!print_format)
print_format = av_strdup("default"); print_format = av_strdup("default");
if (!print_format) {
ret = AVERROR(ENOMEM);
goto end;
}
w_name = av_strtok(print_format, "=", &buf); w_name = av_strtok(print_format, "=", &buf);
w_args = buf; w_args = buf;