aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/alarm.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@redhat.com>2025-08-11 17:42:12 +0100
committerMaciej W. Rozycki <macro@redhat.com>2025-08-11 17:42:12 +0100
commitbc5cf785436ad988fefce7e9ea6b6b4df2a094d2 (patch)
tree86040380ecf4c4438849e0f7b6071718ceded358 /sysdeps/unix/alarm.c
parent1c1f5e8f6d928d6e1f7bd8982a0793f51825c7ec (diff)
downloadglibc-master.zip
glibc-master.tar.gz
glibc-master.tar.bz2
stdio-common: Fix macro parameter shadowing in scanf input specifier testsHEADmaster
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>
Diffstat (limited to 'sysdeps/unix/alarm.c')
0 files changed, 0 insertions, 0 deletions