SCP: Avoid additional potential buffer overflow formatting debug repeat count
As reported in #915
This commit is contained in:
parent
a6198d8fad
commit
892f7d5636
1 changed files with 1 additions and 1 deletions
2
scp.c
2
scp.c
|
@ -13039,7 +13039,7 @@ while ((eol = strchr (debug_line_buf, '\n')) || flush) {
|
||||||
if (debug_line_count > 0)
|
if (debug_line_count > 0)
|
||||||
_debug_fwrite (debug_line_buf_last, strlen (debug_line_buf_last));
|
_debug_fwrite (debug_line_buf_last, strlen (debug_line_buf_last));
|
||||||
if (debug_line_count > 1) {
|
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" : "");
|
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));
|
_debug_fwrite (debug_line_last_prefix, strlen (debug_line_last_prefix));
|
||||||
|
|
Loading…
Add table
Reference in a new issue