mirror of
https://github.com/rfc1036/whois.git
synced 2026-08-31 07:30:22 +00:00
Merge 6aec9d62ef0f7521a99a9e9aadc064a11812fcf7 into 54d60d8ebaf0034dc485a56bbb08f9f1356d7545
This commit is contained in:
commit
766dff2df5
7
whois.c
7
whois.c
@ -1420,6 +1420,9 @@ char *convert_6to4(const char *s)
|
||||
b = 0;
|
||||
}
|
||||
|
||||
if (a > 0xFFFF || b > 0xFFFF)
|
||||
return strdup("0.0.0.0");
|
||||
|
||||
new = malloc(sizeof("255.255.255.255"));
|
||||
sprintf(new, "%u.%u.%u.%u", a >> 8, a & 0xff, b >> 8, b & 0xff);
|
||||
|
||||
@ -1436,6 +1439,10 @@ char *convert_teredo(const char *s)
|
||||
|
||||
a ^= 0xffff;
|
||||
b ^= 0xffff;
|
||||
|
||||
if (a > 0xFFFF || b > 0xFFFF)
|
||||
return strdup("0.0.0.0");
|
||||
|
||||
new = malloc(sizeof("255.255.255.255"));
|
||||
sprintf(new, "%u.%u.%u.%u", a >> 8, a & 0xff, b >> 8, b & 0xff);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user