[FFmpeg-cvslog] avformat/mpeg: zero initialize idx_pkt

James Almer git at videolan.org
Sun Sep 24 01:46:48 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Sep 23 19:37:21 2017 -0300| [86be73c7c1a5c789ad971d4ec620edc839d46820] | committer: James Almer

avformat/mpeg: zero initialize idx_pkt

Prevents use of uninitialized stack.

Signed-off-by: James Almer <jamrial at gmail.com>

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

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

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 68a848a6f6..50fe7a1a76 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -884,7 +884,7 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt)
     FFDemuxSubtitlesQueue *q;
     AVIOContext *pb = vobsub->sub_ctx->pb;
     int ret, psize, total_read = 0, i;
-    AVPacket idx_pkt;
+    AVPacket idx_pkt = { 0 };
 
     int64_t min_ts = INT64_MAX;
     int sid = 0;



More information about the ffmpeg-cvslog mailing list