diff options
author | Andreas Schwab <schwab@suse.de> | 2014-09-16 11:17:04 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2019-02-04 15:45:02 +0100 |
commit | 65f7767a914144ae303f7b9ae81865061793dcb9 (patch) | |
tree | 9af5f491383e603957b206d18336972572cde7c1 /wcsmbs/wmemcmp.c | |
parent | 3f635fb43389b54f682fc9ed2acc0b2aaf4a923d (diff) | |
download | glibc-65f7767a914144ae303f7b9ae81865061793dcb9.zip glibc-65f7767a914144ae303f7b9ae81865061793dcb9.tar.gz glibc-65f7767a914144ae303f7b9ae81865061793dcb9.tar.bz2 |
Fix handling of collating elements in fnmatch (bug 17396, bug 16976)
This fixes the same bug in fnmatch that was fixed by commit 7e2f0d2d77 for
regexp matching. As a side effect it also removes the use of an unbound
VLA.
Diffstat (limited to 'wcsmbs/wmemcmp.c')
-rw-r--r-- | wcsmbs/wmemcmp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wcsmbs/wmemcmp.c b/wcsmbs/wmemcmp.c index 5b243ba..5e137fd 100644 --- a/wcsmbs/wmemcmp.c +++ b/wcsmbs/wmemcmp.c @@ -18,12 +18,12 @@ #include <wchar.h> -#ifndef WMEMCMP -# define WMEMCMP wmemcmp +#ifdef WMEMCMP +# define __wmemcmp WMEMCMP #endif int -WMEMCMP (const wchar_t *s1, const wchar_t *s2, size_t n) +__wmemcmp (const wchar_t *s1, const wchar_t *s2, size_t n) { wchar_t c1; wchar_t c2; @@ -81,3 +81,6 @@ WMEMCMP (const wchar_t *s1, const wchar_t *s2, size_t n) return 0; } +#ifndef WMEMCMP +weak_alias (__wmemcmp, wmemcmp) +#endif |