[FFmpeg-devel] [PATCH 8/9] movenc-test: fix potential uninitialized read

Timo Rothenpieler timo at rothenpieler.org
Wed Nov 8 20:17:52 EET 2017


Fixes CID #1413023
---
 libavformat/tests/movenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/tests/movenc.c b/libavformat/tests/movenc.c
index 8e59b74259..a210aec7ba 100644
--- a/libavformat/tests/movenc.c
+++ b/libavformat/tests/movenc.c
@@ -108,7 +108,7 @@ static int io_write_data_type(void *opaque, uint8_t *buf, int size,
                               enum AVIODataMarkerType type, int64_t time)
 {
     char timebuf[30], content[5] = { 0 };
-    const char *str;
+    const char *str = "unknown";
     switch (type) {
     case AVIO_DATA_MARKER_HEADER:         str = "header";   break;
     case AVIO_DATA_MARKER_SYNC_POINT:     str = "sync";     break;
-- 
2.14.2



More information about the ffmpeg-devel mailing list