lavf/mpeg: Initialize a stack variable used by memcmp().
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 19 Feb 2017 15:15:34 +0000 (16:15 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Tue, 21 Feb 2017 01:15:08 +0000 (02:15 +0100)
Silence a valgrind warning.

Fixes ticket #6160.

libavformat/mpeg.c

index 423877e..a651cb3 100644 (file)
@@ -138,7 +138,7 @@ typedef struct MpegDemuxContext {
 static int mpegps_read_header(AVFormatContext *s)
 {
     MpegDemuxContext *m = s->priv_data;
-    char buffer[7];
+    char buffer[7] = { 0 };
     int64_t last_pos = avio_tell(s->pb);
 
     m->header_state = 0xff;