mirror of
https://github.com/weechat/weechat.git
synced 2026-07-02 15:53:12 +02:00
xfer: fix conversion of string to IPv4 on 32-bit systems (issue #1999)
This commit is contained in:
@@ -49,6 +49,9 @@ TEST(XferNetwork, ConvertIntegerToIpv4)
|
||||
POINTERS_EQUAL(NULL, xfer_network_convert_integer_to_ipv4 ("0"));
|
||||
POINTERS_EQUAL(NULL, xfer_network_convert_integer_to_ipv4 ("-1"));
|
||||
|
||||
/* too big: UINT32_MAX + 1 = 4294967296 */
|
||||
POINTERS_EQUAL(NULL, xfer_network_convert_integer_to_ipv4 ("4294967296"));
|
||||
|
||||
WEE_TEST_STR("0.0.0.1", xfer_network_convert_integer_to_ipv4 ("1"));
|
||||
WEE_TEST_STR("0.0.1.0", xfer_network_convert_integer_to_ipv4 ("256"));
|
||||
WEE_TEST_STR("0.1.0.0", xfer_network_convert_integer_to_ipv4 ("65536"));
|
||||
|
||||
Reference in New Issue
Block a user