diff options
-rw-r--r-- | networking/whois.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/networking/whois.c b/networking/whois.c index 55e1de964..caa71ac51 100644 --- a/networking/whois.c +++ b/networking/whois.c | |||
@@ -53,7 +53,9 @@ static char *query(const char *host, int port, const char *domain) | |||
53 | fp = xfdopen_for_read(fd); | 53 | fp = xfdopen_for_read(fd); |
54 | 54 | ||
55 | success = 0; | 55 | success = 0; |
56 | while (fgets(linebuf, sizeof(linebuf)-1, fp)) { | 56 | while (bufpos < 32*1024 /* paranoia */ |
57 | && fgets(linebuf, sizeof(linebuf)-1, fp) | ||
58 | ) { | ||
57 | unsigned len; | 59 | unsigned len; |
58 | 60 | ||
59 | len = strcspn(linebuf, "\r\n"); | 61 | len = strcspn(linebuf, "\r\n"); |