aboutsummaryrefslogtreecommitdiff
path: root/wcsmbs/tst-wcstol-binary-c11.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-05-25 08:14:37 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-05-25 09:28:23 -0300
commit95c9a6e806226cbf174c92efc021a0d464f170a4 (patch)
tree0a02ebbc928a183e2328c265494b1915f5b658b8 /wcsmbs/tst-wcstol-binary-c11.c
parente0189b25403f8b67e7a5513d6c33fb09cb2e5e20 (diff)
downloadglibc-95c9a6e806226cbf174c92efc021a0d464f170a4.zip
glibc-95c9a6e806226cbf174c92efc021a0d464f170a4.tar.gz
glibc-95c9a6e806226cbf174c92efc021a0d464f170a4.tar.bz2
Fix special case for C2x strtol binary constant handling (BZ# 30371)
When the base is 0 or 2 and the first two characters are '0' and 'b', but the rest are no binary digits. In this case this is no error, and strtol must return 0 and ENDPTR points to the 'x' or 'b'. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'wcsmbs/tst-wcstol-binary-c11.c')
-rw-r--r--wcsmbs/tst-wcstol-binary-c11.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wcsmbs/tst-wcstol-binary-c11.c b/wcsmbs/tst-wcstol-binary-c11.c
index bff1d87..fdd79ec 100644
--- a/wcsmbs/tst-wcstol-binary-c11.c
+++ b/wcsmbs/tst-wcstol-binary-c11.c
@@ -20,6 +20,7 @@
#undef _GNU_SOURCE
#define CHAR wchar_t
+#define WIDE 1
#define FNPFX wcsto
#define L_(C) L ## C
#define TEST_C2X 0