[PATCH] iphlpapi: Fix ULONG comparisons, most notably for IPv4 addresses.

Huw Davies huw at codeweavers.com
Tue Feb 15 04:01:35 CST 2022


On Tue, Feb 15, 2022 at 03:35:37AM +0100, Francois Gouget wrote:
> The difference between two ULONGs may not fit in an int, causing sorting
> errors.
> 
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
> Another approach would be to modify all the comparison functions to
> return a 64-bit value which would ensure no overflow happensi (they are
> all internal functions so that should work).
> 
> The IPv6 address comparisons use memcmp() so the resulting value should
> fit in an int.

How about introducing a DWORD_cmp() helper?

Huw.



More information about the wine-devel mailing list