Skip to content

Commit b7c26d2

Browse files
authored
Merge pull request #859 from anhu/offby1
Fix an off by one error.
2 parents 3e53827 + 65f01e7 commit b7c26d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17007,7 +17007,7 @@ int wolfSSH_CleanPath(WOLFSSH* ssh, char* in)
1700717007
/* remove any /./ patterns, direcotries, exclude cases like ./ok./test */
1700817008
for (i = 1; i + 1 < sz; i++) {
1700917009
if (path[i] == '.' && path[i - 1] == WS_DELIM && path[i + 1] == WS_DELIM) {
17010-
WMEMMOVE(path + (i-1), path + (i+1), sz - (i-1));
17010+
WMEMMOVE(path + (i-1), path + (i+1), sz - i);
1701117011
sz -= 2; /* removed '/.' from string*/
1701217012
i--;
1701317013
}

0 commit comments

Comments
 (0)