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

Git pushed a commit to branch master
in repository ffmpeg.

commit 0a6f7590274a89895c074779f606acd62b614058
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Mon Aug 17 12:03:20 2026 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Thu Aug 27 00:11:44 2026 +0200

    avformat/utils: Make ff_data_to_hex() usable with sizes > INT_MAX/2
    
    It uses an int size field, so it should support the whole range.
    Notice that no current caller could ever have been affected by this.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavformat/utils.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index cb0ae7444e..dabd958397 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -473,11 +473,12 @@ char *ff_data_to_hex(char *buff, const uint8_t *src, int 
s, int lowercase)
                                            'c', 'd', 'e', 'f' };
     const char *hex_table = lowercase ? hex_table_lc : hex_table_uc;
 
-    for (int i = 0; i < s; i++) {
+    av_assume(s >= 0);
+    for (unsigned i = 0; i < s; i++) {
         buff[i * 2]     = hex_table[src[i] >> 4];
         buff[i * 2 + 1] = hex_table[src[i] & 0xF];
     }
-    buff[2 * s] = '\0';
+    buff[2U * s] = '\0';
 
     return buff;
 }

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