mirror of
https://github.com/simh/simh.git
synced 2026-05-01 05:48:35 +00:00
SCP: Fix Coverity identified issues
This commit is contained in:
3
scp.c
3
scp.c
@@ -3679,7 +3679,7 @@ char *tstr = (char *)malloc (1 + rbuf_len);
|
|||||||
strcpy (tstr, rbuf);
|
strcpy (tstr, rbuf);
|
||||||
|
|
||||||
if (*ops == '~') { /* Substring? */
|
if (*ops == '~') { /* Substring? */
|
||||||
int offset, length = rbuf_len;
|
int offset = 0, length = rbuf_len;
|
||||||
int o, l;
|
int o, l;
|
||||||
|
|
||||||
switch (sscanf (ops + 1, "%d,%d", &o, &l)) {
|
switch (sscanf (ops + 1, "%d,%d", &o, &l)) {
|
||||||
@@ -3741,6 +3741,7 @@ else {
|
|||||||
rbuf += move_size;
|
rbuf += move_size;
|
||||||
if (rbuf_size)
|
if (rbuf_size)
|
||||||
*rbuf = '\0';
|
*rbuf = '\0';
|
||||||
|
free (match);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free (tstr);
|
free (tstr);
|
||||||
|
|||||||
Reference in New Issue
Block a user