aboutgitcodebugslistschat
path: root/doc
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2025-05-13 11:41:01 +0200
committerStefano Brivio <sbrivio@redhat.com>2025-05-14 17:51:35 +0200
commit0f7bf10b0a5542690dc6c75e4b56a6030ca8a663 (patch)
tree7065e41b0ca8aac21de09bf0765c728a88521998 /doc
parenta6b9832e495be636bcccf25e0aebdeb564addf06 (diff)
downloadpasst-0f7bf10b0a5542690dc6c75e4b56a6030ca8a663.tar
passt-0f7bf10b0a5542690dc6c75e4b56a6030ca8a663.tar.gz
passt-0f7bf10b0a5542690dc6c75e4b56a6030ca8a663.tar.bz2
passt-0f7bf10b0a5542690dc6c75e4b56a6030ca8a663.tar.lz
passt-0f7bf10b0a5542690dc6c75e4b56a6030ca8a663.tar.xz
passt-0f7bf10b0a5542690dc6c75e4b56a6030ca8a663.tar.zst
passt-0f7bf10b0a5542690dc6c75e4b56a6030ca8a663.zip
ndp: Fix Clang analyzer warning (clang-analyzer-security.PointerSub)
Addresses Clang warning: "Subtraction of two pointers that do not point into the same array is undefined behavior" for the line: `ndp_send(c, dst, &ra, ptr - (unsigned char *)&ra);` Here, `ptr` is `&ra.var[0]`. The subtraction calculates the offset of `var[0]` within the `struct ra_options ra`. Since `ptr` points inside `ra`, this pointer arithmetic is well-defined for calculating the size of the data to send, even if `ptr` and `&ra` are not strictly considered part of the same "array" by the analyzer. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions