1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-26 00:57:39 +03:00
Files
glibc/stdio-common
Maciej W. Rozycki bc5cf78543 stdio-common: Fix macro parameter shadowing in scanf input specifier tests
The use of the same name for a local variable combined with passing a
pointer to it to a nested macro call causes the wrong 'err' variable to
be updated in 'read_real', because '&err' is only expanded at '*errp'
evaluation.  Consequently the variable defined in 'read_real' is set
rather than one in its 'verify_input' caller as it would be the case
should 'read_real' be a function, leading to invalid input such as:

%a:nan:1:3:nan(:

to be accepted.

Address the issue by renaming the 'err' variable in 'verify_input' to
'errx', causing such input to be correctly rejected:

error: ./tst-scanf-format-skeleton.c:242: input line 1: input data format error

No test case added as it's a test case issue in the first place.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-11 17:42:12 +01:00
..
2024-12-22 17:29:28 +08:00
2023-06-13 19:59:08 -04:00
2023-06-13 19:59:08 -04:00
2024-12-22 17:29:28 +08:00
2023-06-01 13:01:32 -04:00
2023-06-13 19:59:08 -04:00
2021-09-03 22:06:44 +05:30
2023-06-01 13:01:32 -04:00
2023-05-18 12:34:00 -04:00
2023-05-18 12:34:00 -04:00
2023-05-18 12:34:00 -04:00
2025-04-28 09:51:59 -03:00
2025-05-16 19:53:09 +02:00
2023-06-13 19:59:08 -04:00
2017-11-16 11:49:26 +05:30
2025-01-28 12:50:50 -05:00
2017-11-16 11:49:26 +05:30
2023-10-30 13:03:59 -03:00