avcodec/vqavideo: allocate the codebook zeroed

Fixes: use of uninitialized memory
Fixes: Tt4RMe2vAHv6
Fixes: trithem-vqa-cbf0-short-read-2389ec50.vqa
Fixes: vqa-cbf0-empty-variant.vqa
Found-by: Trithem90
This commit is contained in:
Michael Niedermayer authored and michaelni committed 2026-10-11 00:48:32 +00:00
1 parent 5474b1e05a
commit f9df3577ac
1 file changed
+1 -1
+1 -1
View File
@@ -183,7 +183,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
/* allocate codebooks */
s->codebook_size = MAX_CODEBOOK_SIZE;
s->codebook = av_malloc(s->codebook_size);
s->codebook = av_mallocz(s->codebook_size);
if (!s->codebook)
return AVERROR(ENOMEM);
s->next_codebook_buffer = av_malloc(s->codebook_size);