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 /pwd | |
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 'pwd')
0 files changed, 0 insertions, 0 deletions