mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 21:20:41 +00:00
avcodec/shorten: clear bitstream buffer
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f3ca95606fb_6393_luckynight-partial.shn Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f371a4a57d
commit
1486ed0815
@ -432,6 +432,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
|
||||
av_log(avctx, AV_LOG_ERROR, "error allocating bitstream buffer\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
memset(tmp_ptr, 0, s->allocated_bitstream_size);
|
||||
s->bitstream = tmp_ptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user