From 3a936d920227e0f74e09ce5e60c96009f1c367b8 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Tue, 16 Jan 2024 23:30:33 -0500 Subject: [PATCH] Practice safe snprintf()ing --- src/speedo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/speedo.c b/src/speedo.c index 0b004b0..109db21 100644 --- a/src/speedo.c +++ b/src/speedo.c @@ -85,7 +85,7 @@ static int draw_fg(hexagram_gauge *gauge, cairo_t *cr) { goto error_dial_draw_fg; } - if (snprintf(buf, 8, "%d", (int)speedo->dial.value) < 0) { + if (snprintf(buf, sizeof(buf), "%d", (int)speedo->dial.value) < 0) { goto error_snprintf; }