mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
2c635fabbf
commit
9b195dd579
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user