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 16d0f7f408 avcodec/flashsv: require two bytes for a 15-bit pixel in 
decode_hybrid
16d0f7f408 is described below

commit 16d0f7f408ba47b4091a22109d4f22f5fd57820a
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Sep 14 02:11:16 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sun Oct 4 21:14:43 2026 +0000

    avcodec/flashsv: require two bytes for a 15-bit pixel in decode_hybrid
    
    Fixes: read of uninitialized memory
    Fixes: YwR11Eee5EpN
    Found-by: zhang xingxing
---
 libavcodec/flashsv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 85540ed0d8..eb58e9ce09 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -85,6 +85,8 @@ static int decode_hybrid(const uint8_t *sptr, const uint8_t 
*sptr_end, uint8_t *
             if (sptr >= sptr_end)
                 return AVERROR_INVALIDDATA;
             if (*sptr & 0x80) {
+                if (sptr + 2 > sptr_end)
+                    return AVERROR_INVALIDDATA;
                 /* 15-bit color */
                 unsigned c = AV_RB16(sptr) & ~0x8000;
                 unsigned b =  c        & 0x1F;

-- 
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]

Reply via email to