summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-04-15 23:30:34 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-04-15 23:30:34 +0000
commit2a8b2dc46d5317d2eb35a347f58c6c8cde7514db (patch)
tree3d63e852c65296a0e83de4a16c2f18044165ba63
parent3393064a22b604d4b6d9b668d40161f0f6540d17 (diff)
I lied, we didn't skip blanks after WHOIS_SERVER_ID; this fixes that.
-rw-r--r--usr.bin/whois/whois.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c
index feb1cdc7244..d8df80d9969 100644
--- a/usr.bin/whois/whois.c
+++ b/usr.bin/whois/whois.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: whois.c,v 1.24 2003/04/15 23:24:45 millert Exp $ */
+/* $OpenBSD: whois.c,v 1.25 2003/04/15 23:30:33 millert Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)whois.c 8.1 (Berkeley) 6/6/93";
#else
-static const char rcsid[] = "$OpenBSD: whois.c,v 1.24 2003/04/15 23:24:45 millert Exp $";
+static const char rcsid[] = "$OpenBSD: whois.c,v 1.25 2003/04/15 23:30:33 millert Exp $";
#endif
#endif /* not lint */
@@ -234,6 +234,8 @@ whois(const char *query, const char *server, const char *port, int flags)
if ((p = strstr(buf, WHOIS_SERVER_ID))) {
p += sizeof(WHOIS_SERVER_ID) - 1;
+ while (isblank(*p))
+ p++;
if ((len = strcspn(p, " \t\n\r"))) {
if ((nhost = malloc(len + 1)) == NULL)
err(1, "malloc");