sprintf() -> snprintf()

This commit is contained in:
Bruce Hill 2025-03-28 14:39:25 -04:00
parent 29fab56493
commit 84cb29f819

View File

@ -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"));