Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib: parser: fix match_wildcard to correctly handle trailing stars

This fixes a bug in match_wildcard that incorrectly handles trailing
asterisks. For example, `match_wildcard("abc**", "abc")` must return
true, but it returns false.

Link: https://lkml.kernel.org/r/20260326020630.4139520-1-inseob@google.com
Signed-off-by: Inseob Kim <inseob@google.com>
Cc: Changbin Du <changbin.du@gmail.com>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Joe Perches <joe@perches.com>
Cc: Josh Law <objecting@objecting.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Inseob Kim and committed by
Andrew Morton
d01684a2 0913b755

+1 -1
+1 -1
lib/parser.c
··· 315 315 } 316 316 } 317 317 318 - if (*p == '*') 318 + while (*p == '*') 319 319 ++p; 320 320 return !*p; 321 321 }