[FFmpeg-cvslog] lavf/mpeg: Initialize a stack variable used by memcmp().

Carl Eugen Hoyos git at videolan.org
Tue Feb 21 03:16:33 EET 2017


ffmpeg | branch: release/3.1 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Feb 19 16:15:34 2017 +0100| [007cf1786c8bb74297b9b0c4be0987aef608134e] | committer: Carl Eugen Hoyos

lavf/mpeg: Initialize a stack variable used by memcmp().

Silence a valgrind warning.

Fixes ticket #6160.
(cherry picked from commit a5c1c7a8b3d13c86b453558628951c3f52054ab4)

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

 libavformat/mpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 423877e..a651cb3 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -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;



More information about the ffmpeg-cvslog mailing list