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

Git pushed a commit to branch master
in repository ffmpeg.

commit 4f5dfce5a866caa95ab2dec03d236ee3dfe7a1ed
Author:     Leo Izen <[email protected]>
AuthorDate: Sat Apr 4 11:33:12 2026 -0400
Commit:     Leo Izen <[email protected]>
CommitDate: Fri May 1 07:40:24 2026 -0400

    avcodec/exif.c: use less than or equal for max width and height
    
    The max width and height for PIXEL_X_TAG and PIXEL_Y_TAG is 0xFFFFu
    because these are unsigned shorts, but we used < instead of <=
    erroneously. Fix that.
    
    Signed-off-by: Leo Izen <[email protected]>
---
 libavcodec/exif.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/exif.c b/libavcodec/exif.c
index 8c2e41b764..9390532390 100644
--- a/libavcodec/exif.c
+++ b/libavcodec/exif.c
@@ -1465,7 +1465,7 @@ int ff_exif_sanitize_ifd(void *logctx, const AVFrame 
*frame, AVExifMetadata *ifd
         if (ret < 0)
             goto end;
     }
-    if (!pw && w && w < 0xFFFFu || !ph && h && h < 0xFFFFu) {
+    if (!pw && w && w <= 0xFFFFu || !ph && h && h <= 0xFFFFu) {
         AVExifMetadata *exif;
         AVExifEntry *exif_entry;
         int exif_found = av_exif_get_entry(logctx, ifd, EXIFIFD_TAG, 0, 
&exif_entry);
@@ -1483,12 +1483,12 @@ int ff_exif_sanitize_ifd(void *logctx, const AVFrame 
*frame, AVExifMetadata *ifd
             }
             exif = &ifd->entries[ifd->count - 1].value.ifd;
         }
-        if (!pw && w && w < 0xFFFFu) {
+        if (!pw && w && w <= 0xFFFFu) {
             ret = av_exif_set_entry(logctx, exif, PIXEL_X_TAG, AV_TIFF_SHORT, 
1, NULL, 0, &w);
             if (ret < 0)
                 goto end;
         }
-        if (!ph && h && h < 0xFFFFu) {
+        if (!ph && h && h <= 0xFFFFu) {
             ret = av_exif_set_entry(logctx, exif, PIXEL_Y_TAG, AV_TIFF_SHORT, 
1, NULL, 0, &h);
             if (ret < 0)
                 goto end;

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

Reply via email to