From a8d4fe8846873d47f3913da7322dbe731455e492 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 4 Aug 2018 08:28:12 -0700 Subject: [PATCH] SCP: Fix potential NULL pointer dereference - Coverity --- scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.c b/scp.c index 677ead6b..03e4a673 100644 --- a/scp.c +++ b/scp.c @@ -12263,7 +12263,7 @@ while ((eol = strchr (debug_line_buf, '\n')) || flush) { } } debug_line_offset -= linesize; - if (debug_line_offset > 0) + if ((debug_line_offset > 0) && (!flush)) memmove (debug_line_buf, eol + 1, debug_line_offset); debug_line_buf[debug_line_offset] = '\0'; }