mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/eatgv: use av_mallocz() for frame_buffer
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7fbf6159587b_2571_ORIGIN.TGV Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
51fed95dde
commit
bb9f55163f
@ -311,7 +311,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
|
||||
frame->pict_type = AV_PICTURE_TYPE_I;
|
||||
|
||||
if (!s->frame_buffer &&
|
||||
!(s->frame_buffer = av_malloc(s->width * s->height)))
|
||||
!(s->frame_buffer = av_mallocz(s->width * s->height)))
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if (unpack(buf, buf_end, s->frame_buffer, s->avctx->width, s->avctx->height) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user