mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 15:48:06 +02:00
platform: fix undefined behavior for pointer comparison in ip4_addr_subnets_is_plain_address()
Fixes:2f68a50041('platform: fix the order of addition of primary and secondary IPv4 addresses') (cherry picked from commit40f22e69c8)
This commit is contained in:
parent
8736cc8618
commit
41b56cb2b9
1 changed files with 2 additions and 2 deletions
|
|
@ -3762,8 +3762,8 @@ clear_and_next:
|
|||
static gboolean
|
||||
ip4_addr_subnets_is_plain_address(const GPtrArray *addresses, gconstpointer needle)
|
||||
{
|
||||
return needle >= (gconstpointer) &addresses->pdata[0]
|
||||
&& needle < (gconstpointer) &addresses->pdata[addresses->len];
|
||||
return nm_ptr_to_uintptr(needle) >= nm_ptr_to_uintptr(&addresses->pdata[0])
|
||||
&& nm_ptr_to_uintptr(needle) < nm_ptr_to_uintptr(&addresses->pdata[addresses->len]);
|
||||
}
|
||||
|
||||
static const NMPObject **
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue