diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-19 15:57:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-19 18:40:49 +0200 |
commit | 23614d09d51178a0be368d5fdf39a6f014f46988 (patch) | |
tree | 53908f95dbe42fb03908613401384e7f0a2b95ed | |
parent | bea4894d0c429fee33ac5c9f8a0874404638d816 (diff) | |
download | ffmpeg-23614d09d51178a0be368d5fdf39a6f014f46988.tar.gz |
avutil/avstring: Do not print NULL
Fixes segfault
Fixes Ticket4452
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 52e02a9e59f83ede84363d0f035389e44357d4a5)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavutil/avstring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/avstring.c b/libavutil/avstring.c index f785816063..5fa295d5e1 100644 --- a/libavutil/avstring.c +++ b/libavutil/avstring.c @@ -502,7 +502,7 @@ int main(void) printf("Testing av_append_path_component()\n"); #define TEST_APPEND_PATH_COMPONENT(path, component, expected) \ fullpath = av_append_path_component((path), (component)); \ - printf("%s = %s\n", fullpath, expected); \ + printf("%s = %s\n", fullpath ? fullpath : "(null)", expected); \ av_free(fullpath); TEST_APPEND_PATH_COMPONENT(NULL, NULL, "(null)") TEST_APPEND_PATH_COMPONENT("path", NULL, "path"); |