[FFmpeg-devel] [PATCH] libavformat/mpeg.c: Initialize the buffer uses to read the PTS.

Thierry Foucu tfoucu at gmail.com
Fri Aug 14 00:21:55 EEST 2020


Fixed an Use-of-uninitialized-value
---
 libavformat/mpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 265b2bd1ad..15a768e6e8 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -146,7 +146,7 @@ static int mpegps_read_header(AVFormatContext *s)
 
 static int64_t get_pts(AVIOContext *pb, int c)
 {
-    uint8_t buf[5];
+    uint8_t buf[5] = {};
 
     buf[0] = c < 0 ? avio_r8(pb) : c;
     avio_read(pb, buf + 1, 4);
-- 
2.28.0.220.ged08abb693-goog



More information about the ffmpeg-devel mailing list