From af2f3f99b90ded1481c80912744cd0a0dfa58d6b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 7 Oct 2025 12:12:05 +0200 Subject: [PATCH] col: use snprintf() instead of sprintf() Signed-off-by: Karel Zak --- text-utils/col.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text-utils/col.c b/text-utils/col.c index 37654eae5..5866d7d0e 100644 --- a/text-utils/col.c +++ b/text-utils/col.c @@ -678,7 +678,7 @@ int main(int argc, char **argv) c = getchar(); if (c == EOF) break; - sprintf(buf, "\\x%02x", (unsigned char) c); + snprintf(buf, sizeof(buf), "\\x%02x", (unsigned char) c); len = strlen(buf); for (i = 0; i < len; i++) { lns.ch = buf[i]; -- 2.47.3