aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-16 04:31:52 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-16 04:32:50 +0100
commit4ecac816780dbb3d3297885856bde6e53a5f7708 (patch)
tree894f22994540acf90d860ad38d3338103a7dd4cc
parentf618cb1a4be82c23c114f7ee6eac05a054fe2273 (diff)
downloadffmpeg-4ecac816780dbb3d3297885856bde6e53a5f7708.tar.gz
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@gmx.at>
-rw-r--r--libavformat/psxstr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index 3409d6a5af..5efcadf64e 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 =