summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-15 23:06:30 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-15 23:13:03 +0100
commitb948ab8132e24d215072120e210139dc456d4997 (patch)
tree9c6c20bcaf03f1a89cdc0a7dd4bf49b38f8c08f4 /libavformat
parent1a01dc83434fbdd1f6604c73afc022795bfb4783 (diff)
downloadffmpeg-streaming-b948ab8132e24d215072120e210139dc456d4997.zip
ffmpeg-streaming-b948ab8132e24d215072120e210139dc456d4997.tar.gz
avformat/jvdec: clear packet padding after downsize
Fixes: use of uninitialized memeory Fixes: msan_uninit-mem_7fbf26b5fefe_5981_intro.jv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/jvdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
index 03ac43d..27ec7ad 100644
--- a/libavformat/jvdec.c
+++ b/libavformat/jvdec.c
@@ -190,6 +190,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->data[4] = jvf->video_type;
if ((size = avio_read(pb, pkt->data + JV_PREAMBLE_SIZE, size)) < 0)
return AVERROR(EIO);
+ memset(pkt->data + JV_PREAMBLE_SIZE + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
pkt->size = size + JV_PREAMBLE_SIZE;
pkt->stream_index = 1;
OpenPOWER on IntegriCloud