From b8cb2e19237a3c7b51b74a72c2e241627bc88256 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 5 Jul 2019 11:19:49 +0200 Subject: tracker/aruco: fix snprintf(3) truncation --- tracker-aruco/ftnoir_tracker_aruco.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp index da29105f..00340208 100644 --- a/tracker-aruco/ftnoir_tracker_aruco.cpp +++ b/tracker-aruco/ftnoir_tracker_aruco.cpp @@ -226,7 +226,7 @@ void aruco_tracker::draw_ar(bool ok) } char buf[9]; - ::snprintf(buf, sizeof(buf)-1, "Hz: %d", clamp(int(fps), 0, 9999)); + ::snprintf(buf, sizeof(buf), "Hz: %d", clamp(int(fps), 0, 9999)); cv::putText(frame, buf, cv::Point(10, 32), cv::FONT_HERSHEY_PLAIN, 2, cv::Scalar(0, 255, 0), 1); } -- cgit v1.2.3