diff options
| author | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-08-10 09:45:24 +0300 |
|---|---|---|
| committer | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-08-10 09:45:24 +0300 |
| commit | 3b228d5c750ba76694bacf75e7be40a024927a31 (patch) | |
| tree | d83ebabc480f355dc3500d20cc8373ec9c782ed1 /accel-pppd/memdebug.c | |
| parent | 7c98f320c3ef7e863a9c7d30bb81735bb4fec46d (diff) | |
| download | accel-ppp-3b228d5c750ba76694bacf75e7be40a024927a31.tar.gz accel-ppp-3b228d5c750ba76694bacf75e7be40a024927a31.zip | |
triton: use offsetof() in list_entry()
list_entry() computed the member offset as &((type *)0)->member, which
is a member access on a null pointer and undefined. UBSan reports it on
every list traversal in the tree:
runtime error: member access within null pointer of type
'struct dhcpv6_option'
The generated code is the same either way, and the offset happens to be
zero for many of the structures involved, so nothing misbehaves today.
offsetof() is what the standard provides for this.
Diffstat (limited to 'accel-pppd/memdebug.c')
0 files changed, 0 insertions, 0 deletions
