summaryrefslogtreecommitdiff
path: root/whois.c
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2002-12-12 02:17:25 +0100
committerMarco d'Itri <md@linux.it>2013-03-30 02:31:29 +0100
commitd6bec26f44f139fa079230c5ee6c9baac8f0be96 (patch)
tree0abd5ac7b1633e0c3160629bba42f3d9ed2145d5 /whois.c
parentfc83e15cf75106806ac98dc35ed57bdd9f6cf7ba (diff)
downloadwhois-d6bec26f44f139fa079230c5ee6c9baac8f0be96.tar.gz
Imported Debian version 4.6.1v4.6.1
Diffstat (limited to 'whois.c')
-rw-r--r--whois.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/whois.c b/whois.c
index f79cca9..9419cca 100644
--- a/whois.c
+++ b/whois.c
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
usage();
/* On some systems realloc only works on non-NULL buffers */
- qstring = malloc(1);
+ qstring = malloc(64);
*qstring = '\0';
/* parse other parameters, if any */
@@ -212,6 +212,12 @@ int main(int argc, char *argv[])
strcat(p, "\r\n");
sockfd = openconn(server, port);
+
+ /*
+ * Now we are connected and the query is supposed to complete quickly.
+ * This will help people who run whois ... | less
+ */
+ alarm(0);
do_query(sockfd, p);
exit(0);