[FFmpeg-cvslog] avutil/avstring: Do not print NULL

Michael Niedermayer git at videolan.org
Fri Jun 19 16:10:39 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jun 19 15:57:32 2015 +0200| [52e02a9e59f83ede84363d0f035389e44357d4a5] | committer: Michael Niedermayer

avutil/avstring: Do not print NULL

Fixes segfault
Fixes Ticket4452

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52e02a9e59f83ede84363d0f035389e44357d4a5
---

 libavutil/avstring.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index b184442..24d1bb9 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");



More information about the ffmpeg-cvslog mailing list