This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new db8beb39c0 avcodec/indeo3: check that the VQ descriptor byte lies
within the plane data
db8beb39c0 is described below
commit db8beb39c034ae16fa5a3790d4b073c65eebb274
Author: Michael Niedermayer <[email protected]>
AuthorDate: Tue Sep 15 05:14:11 2026 +0200
Commit: michaelni <[email protected]>
CommitDate: Wed Sep 23 18:57:28 2026 +0000
avcodec/indeo3: check that the VQ descriptor byte lies within the plane data
decode_cell() read the descriptor byte before comparing against last_ptr,
so a bit tree that ran out of data took the mode and VQ index of its last
cell from the byte after the plane.
That read is bounded: next_cell_data comes either from the bit position,
which the checked bit reader clamps to 8 bits past the end of the plane,
or from a completed cell, whose reads all lie before last_ptr. So the
descriptor is read at most 2 bytes past the plane, the plane ends at or
before the packet, and the read stays inside the packet padding. This is
not an out of array access, the cell was just decoded from a byte that
does not belong to its plane.
Found-by: zhang xingxing
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavcodec/indeo3.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index fb9f3fba3b..4002b42063 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -594,6 +594,11 @@ static int decode_cell(Indeo3DecodeContext *ctx,
AVCodecContext *avctx,
const vqEntry *delta[2];
const uint8_t *data_start = data_ptr;
+ if (data_ptr >= last_ptr) {
+ av_log(avctx, AV_LOG_ERROR, "attempt to read past end of buffer\n");
+ return AVERROR_INVALIDDATA;
+ }
+
/* get coding mode and VQ table index from the VQ descriptor byte */
code = *data_ptr++;
mode = code >> 4;
--
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]