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

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


ffmpeg | branch: release/2.8 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Feb 19 16:15:34 2017 +0100| [518158693ec3470b9600773f6f4b892fe7d59580] | 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=518158693ec3470b9600773f6f4b892fe7d59580
---

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

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 24847ba..fe02af8 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