This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit d1577bc0189cfc66b8af07a28189ed511193af03
Author:     Manuel Lauss <[email protected]>
AuthorDate: Wed Nov 19 13:00:41 2025 +0100
Commit:     Manuel Lauss <[email protected]>
CommitDate: Fri May 8 05:08:22 2026 +0000

    avcodec/sanm: fobj codec37+: reject too large frames.
    
    For the diff-buffer codecs, return error for frames that are larger
    than the currently configured canvas.  This mimics the behaviour
    of the DOS smush engines.
    
    Signed-off-by: Manuel Lauss <[email protected]>
---
 libavcodec/sanm.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
index 56da18d890..abcc34b333 100644
--- a/libavcodec/sanm.c
+++ b/libavcodec/sanm.c
@@ -2087,17 +2087,11 @@ static int process_frame_obj(SANMVideoContext *ctx, 
GetByteContext *gb,
             }
         }
     } else {
-        if (((w > ctx->width) || (h > ctx->height) || (w * h > ctx->buf_size)) 
&& fsc) {
-            /* correct unexpected overly large frames: this happens
-             * for instance with The Dig's sq1.san video: it has a few
-             * (all black) 640x480 frames halfway in, while the rest is
-             * 320x200.
-             */
-            av_log(ctx->avctx, AV_LOG_WARNING,
-                   "resizing too large fobj: c%d  %d %d @ %d %d\n", codec, w, 
h, left, top);
-            w = ctx->width;
-            h = ctx->height;
-        }
+        /* for codec37/47/48, return error for frames larger than the canvas, 
it's also
+         * what the DOS engines do.
+         */
+        if (((w > ctx->width) || (h > ctx->height) || (w * h > ctx->buf_size)) 
&& fsc)
+            return AVERROR_INVALIDDATA;
     }
 
     /* users of codecs>=37 are subversion 2, enforce that for STOR/FTCH */

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

Reply via email to