summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/nios2/__longjmp.S
diff options
context:
space:
mode:
authorFrank Mehnert <frank.mehnert@kernkonzept.com>2025-01-07 13:09:50 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2025-01-07 13:28:17 +0100
commitb92057584f09d442f27b9177b12fe6fdf36ddbaf (patch)
tree10f251b3ce388177ba027e5121f42003ab98aad5 /libc/sysdeps/linux/nios2/__longjmp.S
parent1de51fb74b68a94207384021a878c1a3035d2aff (diff)
fix possible overflow in pointer arithmetics strnlen()
It is undefined behavior to compare two pointers belonging to different objects. This includes the case where the addition overflows. Clang-20 seems to follow this rule more eagerly and optimizes away the old test. Fix the test by performing the addition on uintptr_t values rather than on on char pointers. See also https://github.com/llvm/llvm-project/issues/121909. Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
Diffstat (limited to 'libc/sysdeps/linux/nios2/__longjmp.S')
0 files changed, 0 insertions, 0 deletions