mirror of
https://github.com/rfc1036/whois.git
synced 2026-08-31 07:30:22 +00:00
Fix misspellings in IPv4 formatting string
Querying 6to4 address failed on malformed IPv4 address: $ ./whois 2002:5ab2:d182::1 Querying for the IPv4 endpoint 90d.178d.209d.130d of a 6to4 IPv6 address. This patch fixes it.
This commit is contained in:
parent
d3e6fb0eaf
commit
3566a2c4ca
4
whois.c
4
whois.c
@ -1279,7 +1279,7 @@ char *convert_6to4(const char *s)
|
||||
}
|
||||
|
||||
new = malloc(sizeof("255.255.255.255"));
|
||||
sprintf(new, "%ud.%ud.%ud.%ud", a >> 8, a & 0xff, b >> 8, b & 0xff);
|
||||
sprintf(new, "%u.%u.%u.%u", a >> 8, a & 0xff, b >> 8, b & 0xff);
|
||||
#endif
|
||||
|
||||
return new;
|
||||
@ -1309,7 +1309,7 @@ char *convert_teredo(const char *s)
|
||||
a ^= 0xffff;
|
||||
b ^= 0xffff;
|
||||
new = malloc(sizeof("255.255.255.255"));
|
||||
sprintf(new, "%ud.%ud.%ud.%ud", a >> 8, a & 0xff, b >> 8, b & 0xff);
|
||||
sprintf(new, "%u.%u.%u.%u", a >> 8, a & 0xff, b >> 8, b & 0xff);
|
||||
#endif
|
||||
|
||||
return new;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user