avformat/mov: Clear array to prevent potential out of array read from av_dlog()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 6 Jan 2015 04:54:29 +0000 (05:54 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 6 Jan 2015 14:07:50 +0000 (15:07 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mov.c

index a157d60..e90bfd2 100644 (file)
@@ -380,7 +380,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 
     // worst-case requirement for output string in case of utf8 coded input
     str_size_alloc = (raw ? str_size : str_size * 2) + 1;
-    str = av_malloc(str_size_alloc);
+    str = av_mallocz(str_size_alloc);
     if (!str)
         return AVERROR(ENOMEM);