Skip to content

Commit 6a0ecce

Browse files
mingwandroidAlexpux
authored andcommitted
path.cc: Ignore zero-length exclusions
1 parent bf923b3 commit 6a0ecce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

winsup/cygwin/path.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3452,7 +3452,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions,
34523452
{
34533453
/* Since we've got regex linked we should maybe switch to that, but
34543454
running regexes for every argument could be too slow. */
3455-
if ( strcmp (exclusions, "*") == 0 || strstr (arg, exclusions) == arg )
3455+
if ( strcmp (exclusions, "*") == 0 || (strlen (exclusions) && strstr (arg, exclusions) == arg) )
34563456
return (char*)arg;
34573457
exclusions += strlen (exclusions) + 1;
34583458
}

0 commit comments

Comments
 (0)