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

Git pushed a commit to branch release/9.1
in repository ffmpeg.

commit 3a435c2d962876cc84e2561a6b7433517025b109
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sun Nov 8 16:40:46 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Thu Nov 19 04:36:59 2026 +0100

    avfilter/vf_showinfo: do not assume terminated detection bbox strings
    
    Found during triage of the security report jBRKMspuGY2H
    
    (cherry picked from commit 1a0d0fc597399ddd9386a80f2ca63e3f62ea1a7d)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/vf_showinfo.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index ecd3459e0d..66984be0af 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -169,17 +169,19 @@ static void dump_detection_bbox(AVFilterContext *ctx, 
const AVFrameSideData *sd)
 
     header = (const AVDetectionBBoxHeader *)sd->data;
     nb_bboxes = header->nb_bboxes;
-    av_log(ctx, AV_LOG_INFO, "source: %s\n", header->source);
+    av_log(ctx, AV_LOG_INFO, "source: %.*s\n", (int)sizeof(header->source), 
header->source);
 
     for (int i = 0; i < nb_bboxes; i++) {
         bbox = av_get_detection_bbox(header, i);
-        av_log(ctx, AV_LOG_INFO, "index: %d,\tregion: (%d, %d) -> (%d, %d), 
label: %s, confidence: %d/%d.\n",
+        av_log(ctx, AV_LOG_INFO, "index: %d,\tregion: (%d, %d) -> (%d, %d), 
label: %.*s, confidence: %d/%d.\n",
                                  i, bbox->x, bbox->y, bbox->x + bbox->w, 
bbox->y + bbox->h,
-                                 bbox->detect_label, 
bbox->detect_confidence.num, bbox->detect_confidence.den);
+                                 (int)sizeof(bbox->detect_label), 
bbox->detect_label,
+                                 bbox->detect_confidence.num, 
bbox->detect_confidence.den);
         if (bbox->classify_count > 0) {
             for (int j = 0; j < bbox->classify_count; j++) {
-                av_log(ctx, AV_LOG_INFO, "\t\tclassify:  label: %s, 
confidence: %d/%d.\n",
-                       bbox->classify_labels[j], 
bbox->classify_confidences[j].num, bbox->classify_confidences[j].den);
+                av_log(ctx, AV_LOG_INFO, "\t\tclassify:  label: %.*s, 
confidence: %d/%d.\n",
+                       (int)sizeof(bbox->classify_labels[j]), 
bbox->classify_labels[j],
+                       bbox->classify_confidences[j].num, 
bbox->classify_confidences[j].den);
             }
         }
     }

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