SCP: Fix potential NULL pointer dereference - Coverity
This commit is contained in:
parent
9316978403
commit
a8d4fe8846
1 changed files with 1 additions and 1 deletions
2
scp.c
2
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';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue