diff --git a/scp.c b/scp.c index 984a85f4..9195c340 100644 --- a/scp.c +++ b/scp.c @@ -3680,7 +3680,7 @@ char *tstr = (char *)malloc (1 + rbuf_len); strcpy (tstr, rbuf); if (*ops == '~') { /* Substring? */ - int offset, length; + int offset, length = rbuf_len; int o, l; switch (sscanf (ops + 1, "%d,%d", &o, &l)) {