PR #22568 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22568
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22568.patch

Fixes: use of uninitialized memory

Found-by: Carl Sampson <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>


>From 3a13629791097572aca83f2c5da88387bd7dc039 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Fri, 20 Mar 2026 17:35:51 +0100
Subject: [PATCH] avcodec/escape130: Initialize old_y_avg

Fixes: use of uninitialized memory

Found-by: Carl Sampson <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/escape130.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/escape130.c b/libavcodec/escape130.c
index 4482a0e070..a192831144 100644
--- a/libavcodec/escape130.c
+++ b/libavcodec/escape130.c
@@ -125,7 +125,7 @@ static av_cold int escape130_decode_init(AVCodecContext 
*avctx)
         return AVERROR_INVALIDDATA;
     }
 
-    s->old_y_avg = av_malloc(avctx->width * avctx->height / 4);
+    s->old_y_avg = av_mallocz(avctx->width * avctx->height / 4);
     s->buf1      = av_malloc(avctx->width * avctx->height * 3 / 2);
     s->buf2      = av_malloc(avctx->width * avctx->height * 3 / 2);
     if (!s->old_y_avg || !s->buf1 || !s->buf2) {
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to