]> git.ipfire.org Git - thirdparty/bind9.git/commit
Use offsetof() instead of pointer arithmetics to get slabheader
authorOndřej Surý <ondrej@isc.org>
Wed, 17 Dec 2025 09:01:06 +0000 (10:01 +0100)
committerOndřej Surý <ondrej@isc.org>
Wed, 18 Feb 2026 13:29:16 +0000 (14:29 +0100)
commitb8e07a0b5aed51828af72af2a8d58b090088725d
tree9e68e8a78edbb7779351a57c8f4edbbf6dd613ce
parent499cfc2f24e2a0778f13d884c272879eca670b1d
Use offsetof() instead of pointer arithmetics to get slabheader

In rdataset_getheader() a cast of the raw buffer to dns_slabheader_t and
pointer arithmetics was used to get the start of the slabheader
structure.  Use more correct offsetof(dns_slabheader_t, raw) to
calculate the correct start of the dns_slabheader_t from the flexible
member raw[].
lib/dns/rdataslab.c