mirror of https://github.com/wolfSSL/wolfssh.git
Fix an off by one error.
parent
3e538274df
commit
65f01e7c7a
|
|
@ -17007,7 +17007,7 @@ int wolfSSH_CleanPath(WOLFSSH* ssh, char* in)
|
|||
/* remove any /./ patterns, direcotries, exclude cases like ./ok./test */
|
||||
for (i = 1; i + 1 < sz; i++) {
|
||||
if (path[i] == '.' && path[i - 1] == WS_DELIM && path[i + 1] == WS_DELIM) {
|
||||
WMEMMOVE(path + (i-1), path + (i+1), sz - (i-1));
|
||||
WMEMMOVE(path + (i-1), path + (i+1), sz - i);
|
||||
sz -= 2; /* removed '/.' from string*/
|
||||
i--;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue