This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 66b6ca270b33fd74367d7d371f6de16ec664446e Author: Michael Niedermayer <[email protected]> AuthorDate: Sun Oct 11 07:31:13 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Mon Oct 12 21:18:53 2026 +0000 avcodec/sunrast: expand only the bytes of a packed line that were decoded The 1 and 4 bit per pixel expansion read (w + 7 >> 3) * depth bytes per line while only (depth * w + 7) >> 3 were written, for 4 bits per pixel and widths that are not a multiple of 8 up to 3 uninitialized bytes per line were expanded into the padding of the line. Fixes: use of uninitialized memory Fixes: mGcNxX6EOTeJ Found during the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24877 Use of uninitialized memory Replicated through API with Valgrind --- libavcodec/sunrast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c index 1cd51f4637..fcab3de3b5 100644 --- a/libavcodec/sunrast.c +++ b/libavcodec/sunrast.c @@ -199,7 +199,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, AVFrame *p, uint8_t *ptr_free = ptr2; ptr = p->data[0]; for (y=0; y<h; y++) { - for (x = 0; x < (w + 7 >> 3) * depth; x++) { + for (x = 0; x < len; x++) { if (depth == 1) { ptr[8*x] = ptr2[x] >> 7; ptr[8*x+1] = ptr2[x] >> 6 & 1; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
