Skip to content

Commit

Permalink
fixup! Add functionality for converting UNIX paths in arguments and e…
Browse files Browse the repository at this point in the history
…nvironment variables to Windows form for native Win32 applications.

Don't memchr behind end, it2
  • Loading branch information
dg0yt authored and dscho committed Nov 22, 2023
1 parent 0e7d075 commit 677ece6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions winsup/cygwin/msys2_path_conv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
if (isalpha(ch) && (*(it2+1) == ':') && (*(it2+2) == '/')) {
return SIMPLE_WINDOWS_PATH;
}
if (ch == '/'&& memchr(it2, ',', end - it) == NULL) {
if (ch == '/'&& memchr(it2, ',', end - it2) == NULL) {
*src = it2;
return find_path_start_and_type(src, true, end);
}
Expand All @@ -458,7 +458,7 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
} else {
return POSIX_PATH_LIST;
}
} else if (memchr(it2, '=', end - it) == NULL) {
} else if (memchr(it2, '=', end - it2) == NULL) {
return SIMPLE_WINDOWS_PATH;
}
}
Expand Down

0 comments on commit 677ece6

Please sign in to comment.