diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-01-04 14:26:30 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-02-23 15:58:04 -0300 |
commit | a79328c745219dcb395070cdcd3be065a8347f24 (patch) | |
tree | 310d500264e2b219d91366544d0053f962a60df2 /posix/tst-fnmatch.input | |
parent | 5a664d7ae8e42d641a7b4b436987ff67ab483b08 (diff) | |
download | glibc-a79328c745219dcb395070cdcd3be065a8347f24.tar.gz glibc-a79328c745219dcb395070cdcd3be065a8347f24.tar.xz glibc-a79328c745219dcb395070cdcd3be065a8347f24.zip |
posix: Falling back to non wide mode in case of encoding error [BZ #14185]
Gnulib has added the proposed fix with aed23714d60 (done in 2005), but recently with a glibc merge with 67306f6 (done in 2020 with sync back) it has fallback to old semantic to return -1 on in case of failure. From gnulib developer feedback it was an oversight. Although the full fix for BZ #14185 would require to rewrite fnmatch implementation to use mbrtowc instead of mbsrtowcs on the full input, this mitigate the issue and it has been used by gnulib for a long time. This patch also removes the alloca usage on the string convertion to wide characters before calling the internal function. Checked on x86_64-linux-gnu.
Diffstat (limited to 'posix/tst-fnmatch.input')
-rw-r--r-- | posix/tst-fnmatch.input | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/posix/tst-fnmatch.input b/posix/tst-fnmatch.input index 4fef4ee829..67aac5aada 100644 --- a/posix/tst-fnmatch.input +++ b/posix/tst-fnmatch.input @@ -676,6 +676,8 @@ C "x" "*" 0 PATHNAME|LEADING_DIR C "x/y" "*" 0 PATHNAME|LEADING_DIR C "x/y/z" "*" 0 PATHNAME|LEADING_DIR C "x" "*x" 0 PATHNAME|LEADING_DIR + +en_US.UTF-8 "\366.csv" "*.csv" 0 C "x/y" "*x" 0 PATHNAME|LEADING_DIR C "x/y/z" "*x" 0 PATHNAME|LEADING_DIR C "x" "x*" 0 PATHNAME|LEADING_DIR |