[FFmpeg-cvslog] avformat/psxstr: zero packet to prevent uninitialized data to leak through to the decoder

Michael Niedermayer git at videolan.org
Mon Dec 16 04:44:21 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 16 04:31:52 2013 +0100| [4ecac816780dbb3d3297885856bde6e53a5f7708] | committer: Michael Niedermayer

avformat/psxstr: zero packet to prevent uninitialized data to leak through to the decoder

Fixes: msan_uninit-mem_7f150abf2e84_4817_descent-partial.str
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/psxstr.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index 3409d6a..5efcadf 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -221,6 +221,7 @@ static int str_read_packet(AVFormatContext *s,
                     av_free_packet(pkt);
                     if (av_new_packet(pkt, sector_count*VIDEO_DATA_CHUNK_SIZE))
                         return AVERROR(EIO);
+                    memset(pkt->data, 0, sector_count*VIDEO_DATA_CHUNK_SIZE);
 
                     pkt->pos= avio_tell(pb) - RAW_CD_SECTOR_SIZE;
                     pkt->stream_index =



More information about the ffmpeg-cvslog mailing list