diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2022-12-01 16:37:11 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-12-02 08:18:10 -0800 |
commit | f566b028524149ddfebe7f9770a3befb13b81a13 (patch) | |
tree | 7ddae400809cd9e2902af7fcd59e3bf22597809c /sysdeps/x86_64/x32/Makefile | |
parent | 6ae0737d430900fff02569548a92bdca49622a15 (diff) | |
download | glibc-f566b028524149ddfebe7f9770a3befb13b81a13.tar.gz glibc-f566b028524149ddfebe7f9770a3befb13b81a13.tar.xz glibc-f566b028524149ddfebe7f9770a3befb13b81a13.zip |
x86-64 strncat: Properly handle the length parameter [BZ# 24097]
On x32, the size_t parameter may be passed in the lower 32 bits of a 64-bit register with the non-zero upper 32 bits. The string/memory functions written in assembly can only use the lower 32 bits of a 64-bit register as length or must clear the upper 32 bits before using the full 64-bit register for length. This pach fixes strncat for x32. Tested on x86-64 and x32. On x86-64, libc.so is the same with and without the fix. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
Diffstat (limited to 'sysdeps/x86_64/x32/Makefile')
-rw-r--r-- | sysdeps/x86_64/x32/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/x86_64/x32/Makefile b/sysdeps/x86_64/x32/Makefile index 31732aa248..a015789a4f 100644 --- a/sysdeps/x86_64/x32/Makefile +++ b/sysdeps/x86_64/x32/Makefile @@ -10,7 +10,7 @@ ifeq ($(subdir),string) tests += tst-size_t-memchr tst-size_t-memcmp tst-size_t-memcpy \ tst-size_t-memrchr tst-size_t-memset tst-size_t-strncasecmp \ tst-size_t-strncmp tst-size_t-strncpy tst-size_t-strnlen \ - tst-size_t-memcmp-2 + tst-size_t-memcmp-2 tst-size_t-strncat endif ifeq ($(subdir),wcsmbs) |