From 892f7d5636ece7faf208816e8ae23c889aa92021 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 16 Jul 2020 14:46:15 -0700 Subject: [PATCH] SCP: Avoid additional potential buffer overflow formatting debug repeat count As reported in #915 --- scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.c b/scp.c index b3de1c0f..0fe2165d 100644 --- a/scp.c +++ b/scp.c @@ -13039,7 +13039,7 @@ while ((eol = strchr (debug_line_buf, '\n')) || flush) { if (debug_line_count > 0) _debug_fwrite (debug_line_buf_last, strlen (debug_line_buf_last)); if (debug_line_count > 1) { - char countstr[32]; + char countstr[40]; sprintf (countstr, "same as above (%d time%s)\r\n", (int)(debug_line_count - 1), ((debug_line_count - 1) != 1) ? "s" : ""); _debug_fwrite (debug_line_last_prefix, strlen (debug_line_last_prefix));