about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/riscv/libc-vdso.h
diff options
context:
space:
mode:
authorAvinal Kumar <avinal.xlvii@gmail.com>2024-10-25 15:48:27 +0530
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-10-25 15:05:06 -0300
commit04e8698fcca7d1e932bc54f5b60e1bbce2e87601 (patch)
tree43b2939f0ef8a5abf808806137cd1e30b7217a28 /sysdeps/unix/sysv/linux/riscv/libc-vdso.h
parentac73067cb7a328bf106ecd041c020fc61be7e087 (diff)
downloadglibc-04e8698fcca7d1e932bc54f5b60e1bbce2e87601.tar.gz
glibc-04e8698fcca7d1e932bc54f5b60e1bbce2e87601.tar.xz
glibc-04e8698fcca7d1e932bc54f5b60e1bbce2e87601.zip
stdio-common: Fix scanf parsing for NaN types [BZ #30647]
The scanf family of functions like sscanf and fscanf currently
ignore nan() and nan(n-char-sequence).  This happens because
__vfscanf_internal only checks for 'nan'.

This commit adds support for all valid nan types i.e.  nan, nan()
and nan(n-char-sequence), where n-char-sequence can be
[a-zA-Z0-9_]+, thus fixing the bug 30647.  Any other representation
of NaN should result in conversion error.

New tests are also added to verify the correct parsing of NaN types for
float, double and long double formats.

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/riscv/libc-vdso.h')
0 files changed, 0 insertions, 0 deletions