PR #21643 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21643
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21643.patch

This is consistent with av_get_detection_bbox()

Found-by: 이동준 <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>


From d880c9bf48bb9906304b9fdb4b1070304b4946ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=9D=B4=EB=8F=99=EC=A4=80?= <[email protected]>
Date: Wed, 4 Feb 2026 01:53:25 +0100
Subject: [PATCH] avutil/video_hint: Add assert to av_video_hint_get_rect()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This is consistent with av_get_detection_bbox()

Found-by: 이동준 <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavutil/video_hint.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavutil/video_hint.h b/libavutil/video_hint.h
index 8e8af0ae90..6bb857df4f 100644
--- a/libavutil/video_hint.h
+++ b/libavutil/video_hint.h
@@ -70,6 +70,7 @@ av_video_hint_rects(const AVVideoHint *hints) {
 
 static av_always_inline AVVideoRect *
 av_video_hint_get_rect(const AVVideoHint *hints, size_t idx) {
+    av_assert0(idx < hints->nb_rects);
     return (AVVideoRect *)((uint8_t *)hints + hints->rect_offset + idx * 
hints->rect_size);
 }
 
-- 
2.52.0

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

Reply via email to