summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/fnmatch.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2016-08-17 08:51:47 +0000
committerache <ache@FreeBSD.org>2016-08-17 08:51:47 +0000
commit02a43cd8e225e88b473b2b949679176be6ad4cff (patch)
tree1978889bd9995a93b31f901bbef5c2f48e058db5 /lib/libc/gen/fnmatch.c
parentad158962010209479efd5322cb0bcca8e5ebb9f9 (diff)
downloadFreeBSD-src-02a43cd8e225e88b473b2b949679176be6ad4cff.zip
FreeBSD-src-02a43cd8e225e88b473b2b949679176be6ad4cff.tar.gz
MFC r302824
1) Eliminate possibility to call __*collate_range_cmp() with inclomplete locale (which cause core dump) by removing whole 'table' argument by which it passed. 2) Restore __collate_range_cmp() in __sccl(). 3) Collating [a-z] range in regcomp() work only for single bytes locales (we can't do it now for other ones). In previous code only first 256 wchars are considered and all others are just silently dropped from the range.
Diffstat (limited to 'lib/libc/gen/fnmatch.c')
-rw-r--r--lib/libc/gen/fnmatch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c
index 8cdcaf1..65efe20 100644
--- a/lib/libc/gen/fnmatch.c
+++ b/lib/libc/gen/fnmatch.c
@@ -296,8 +296,8 @@ rangematch(const char *pattern, wchar_t test, int flags, char **newp,
if (table->__collate_load_error ?
c <= test && test <= c2 :
- __wcollate_range_cmp(table, c, test) <= 0
- && __wcollate_range_cmp(table, test, c2) <= 0
+ __wcollate_range_cmp(c, test) <= 0
+ && __wcollate_range_cmp(test, c2) <= 0
)
ok = 1;
} else if (c == test)
OpenPOWER on IntegriCloud