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

Git pushed a commit to branch master
in repository ffmpeg.

commit 1838782c512782d8903372822c7d74d70f0b2ad4
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Nov 3 20:42:25 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Sun Nov 8 00:02:27 2026 +0000

    avutil/hash: terminate the hex string when size is 1
    
    Found during triage of the security report qG4gdnzp4yAQ
    
    Unterminated string Replicated through API with ASAN
    
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavutil/hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/hash.c b/libavutil/hash.c
index fbc24194de..10f055aa40 100644
--- a/libavutil/hash.c
+++ b/libavutil/hash.c
@@ -228,7 +228,7 @@ void av_hash_final_hex(struct AVHashContext *ctx, uint8_t 
*dst, int size)
     unsigned rsize = av_hash_get_size(ctx), i;
 
     av_hash_final(ctx, buf);
-    for (i = 0; i < FFMIN(rsize, size / 2); i++)
+    for (i = 0; i < FFMIN(rsize, size - size / 2); i++)
         snprintf(dst + i * 2, size - i * 2, "%02x", buf[i]);
 }
 

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