From cfc572a53614d91183787c6daf2a1a879368444b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 7 Oct 2025 13:00:37 +0200 Subject: [PATCH] hwclock: use snprintf() instead of sprintf() Signed-off-by: Karel Zak --- sys-utils/hwclock-parse-date.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-utils/hwclock-parse-date.y b/sys-utils/hwclock-parse-date.y index 0d996cc87..5d6daf0e6 100644 --- a/sys-utils/hwclock-parse-date.y +++ b/sys-utils/hwclock-parse-date.y @@ -1513,7 +1513,7 @@ int parse_date(struct timespec *result, char const *p, if (!tz_was_altered) tz0 = get_tz (tz0buf); - sprintf (tz1buf, "XXX%s%jd:%02d", + snprintf (tz1buf, sizeof(tz1buf), "XXX%s%jd:%02d", &"-"[time_zone < 0], abs_time_zone_hour, abs_time_zone_min); -- 2.47.3