Re: [PATCH] libsepol: Use spaceship comparison operator when comparing ibpkeys
Stephen Smalley <[email protected]>
| Newsgroups | org.kernel.vger.selinux |
|---|---|
| Message-ID | <CAEjxPJ7GQqCkz-OVHRgmRn0C5xyYqv6gzqavKh0PrRuR6KVSUg@mail.gmail.com> |
On Wed, Aug 12, 2026 at 2:28 PM James Carter <[email protected]> wrote: > > The comparsion function for ibpkeys in kernel_to_common subtracts > the subnet_prefixes of the two ibpkeys which are unsigned 64-bit > values and stores the result in an int which might not be able > to contain the result. > > Use the spaceship comparison operator to compare the subnet_prefxes > to avoid any issues. > > Signed-off-by: James Carter <[email protected]> Acked-by: Stephen Smalley <[email protected]>