mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +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) {
|
if (ret < 0) {
|
||||||
av_free_packet(pkt);
|
av_free_packet(pkt);
|
||||||
} else
|
} else {
|
||||||
packet_read = 1;
|
packet_read = 1;
|
||||||
|
av_shrink_packet(pkt, ret + 8);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case snd__TAG:
|
case snd__TAG:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user