From 257abceab316ce713f9af75e2a1ff7ad03e34254 Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Wed, 15 Oct 2014 02:15:53 +0200 Subject: Fix 1 and 2 octects in-addr.arpa queries Queries like 85.in-addr.arpa and 94.85.in-addr.arpa were directed to the wrong server. --- whois.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'whois.c') diff --git a/whois.c b/whois.c index c3d2a1d..c4afc09 100644 --- a/whois.c +++ b/whois.c @@ -1247,7 +1247,11 @@ char *convert_inaddr(const char *s) if (domcmp(endptr + 1, ".in-addr.arpa")) return strdup("0.0.0.0"); + } else { + c = b; b = a; a = 0; } + } else { + c = a; a = 0; } new = malloc(sizeof("255.255.255.255")); -- cgit v1.2.3