From 84cb29f81925bb7b0dd085a1b672065a008cc2cd Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 28 Mar 2025 14:39:25 -0400 Subject: [PATCH] sprintf() -> snprintf() --- src/stdlib/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdlib/text.c b/src/stdlib/text.c index 5242a8e..254ed56 100644 --- a/src/stdlib/text.c +++ b/src/stdlib/text.c @@ -1158,7 +1158,7 @@ static INLINE Text_t _quoted(Text_t text, bool colorize, char quote_char) if (colorize) ret = concat2_assuming_safe(ret, Text("\x1b[34;1m")); ret = concat2_assuming_safe(ret, Text("\\x")); char tmp[3]; - sprintf(tmp, "%02X", g); + snprintf(tmp, sizeof(tmp), "%02X", g); ret = concat2_assuming_safe(ret, Text$from_strn(tmp, 2)); if (colorize) ret = concat2_assuming_safe(ret, Text("\x1b[0;35m"));