mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-11 06:00:35 +01: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')
This commit is contained in:
parent
cedaa191d4
commit
40f22e69c8
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