diff options
author | Andreas Schwab <schwab@suse.de> | 2023-10-11 16:22:16 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2023-10-12 11:42:22 +0200 |
commit | 69239bd7a216007692470aa9d5f3658024638742 (patch) | |
tree | 1b14e424f4af40ecf467a57ea1f8cc455d203ca3 /stdlib/tst-strtod4.c | |
parent | d846c2838942297c9644f2f38bdad0fb88f42245 (diff) | |
download | glibc-69239bd7a216007692470aa9d5f3658024638742.tar.gz glibc-69239bd7a216007692470aa9d5f3658024638742.tar.xz glibc-69239bd7a216007692470aa9d5f3658024638742.zip |
stdlib: fix grouping verification with multi-byte thousands separator (bug 30964)
The grouping verification only worked for a single-byte thousands separator. With a multi-byte separator it returned as if no separators were present. The actual parsing in str_to_mpn will then go wrong when there are multiple adjacent multi-byte separators in the number.
Diffstat (limited to 'stdlib/tst-strtod4.c')
-rw-r--r-- | stdlib/tst-strtod4.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stdlib/tst-strtod4.c b/stdlib/tst-strtod4.c index aae9835d82..6cc4e843c7 100644 --- a/stdlib/tst-strtod4.c +++ b/stdlib/tst-strtod4.c @@ -13,7 +13,9 @@ static const struct } tests[] = { { "000"NNBSP"000"NNBSP"000", "", 0.0 }, - { "1"NNBSP"000"NNBSP"000,5x", "x", 1000000.5 } + { "1"NNBSP"000"NNBSP"000,5x", "x", 1000000.5 }, + /* Bug 30964 */ + { "10"NNBSP NNBSP"200", NNBSP NNBSP"200", 10.0 } }; #define NTESTS (sizeof (tests) / sizeof (tests[0])) |