diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2017-11-04 14:45:36 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2017-11-04 14:45:36 +0000 |
| commit | 9bcd95dfb20373d24a544971097deb856b1d9f79 (patch) | |
| tree | 7c18840d75041cfbb2fe797c65865fe588a181bc /lib/libc/regex | |
| parent | 804785977ec4291d422e9577285c2c2d0e3b4140 (diff) | |
Notes
Diffstat (limited to 'lib/libc/regex')
| -rw-r--r-- | lib/libc/regex/regcomp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 1e231fb0344d..49479961ba76 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -922,7 +922,7 @@ p_b_coll_elem(struct parse *p, } len = p->next - sp; for (cp = cnames; cp->name != NULL; cp++) - if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0') + if (strncmp(cp->name, sp, len) == 0 && strlen(cp->name) == len) return(cp->code); /* known name */ memset(&mbs, 0, sizeof(mbs)); if ((clen = mbrtowc(&wc, sp, len, &mbs)) == len) |
