diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc index 45e1d9b53e..c40f504371 100644 --- a/winsup/cygwin/msys2_path_conv.cc +++ b/winsup/cygwin/msys2_path_conv.cc @@ -490,7 +490,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); } @@ -519,7 +519,7 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en goto skip_p2w; return POSIX_PATH_LIST; } - } else if (memchr(it2, '=', end - it) == NULL) { + } else if (memchr(it2, '=', end - it2) == NULL) { return SIMPLE_WINDOWS_PATH; } } else if (ch != '.') {