diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2017-08-10 15:42:25 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2017-08-10 15:42:25 +0000 |
commit | 303cbb93c5cc997c78c180eea59a64281be354b7 (patch) | |
tree | f933873b4371b217aa3f242f9667fd8688a4d029 | |
parent | f8054adeb1e943d1114c1e5ce28660a6c81f9d7c (diff) |
Notes
-rw-r--r-- | lib/libc/gen/fnmatch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c index 83e1b1964c77..5a988af06c2a 100644 --- a/lib/libc/gen/fnmatch.c +++ b/lib/libc/gen/fnmatch.c @@ -184,7 +184,8 @@ fnmatch1(const char *pattern, const char *string, const char *stringstart, if (!(flags & FNM_NOESCAPE)) { pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs); - if (pclen == (size_t)-1 || pclen == (size_t)-2) + if (pclen == 0 || pclen == (size_t)-1 || + pclen == (size_t)-2) return (FNM_NOMATCH); pattern += pclen; } |