Commit 9b195dd5 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/4xm: shrink packet if it was only partially initialized

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f6c76ab7950_4920_dracula.4xm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2c635fab
......@@ -319,8 +319,10 @@ static int fourxm_read_packet(AVFormatContext *s,
if (ret < 0) {
av_free_packet(pkt);
} else
} else {
packet_read = 1;
av_shrink_packet(pkt, ret + 8);
}
break;
case snd__TAG:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment