remove possibly bogus length check
authorop <op@openbsd.org>
Mon, 25 Mar 2024 19:11:52 +0000 (19:11 +0000)
committerop <op@openbsd.org>
Mon, 25 Mar 2024 19:11:52 +0000 (19:11 +0000)
len is initially the line length, but then the two go out of sync.
ok millert@

usr.bin/whois/whois.c

index ef0d37c..8a1b75d 100644 (file)
@@ -1,4 +1,4 @@
-/*      $OpenBSD: whois.c,v 1.63 2024/03/25 15:52:39 millert Exp $   */
+/*      $OpenBSD: whois.c,v 1.64 2024/03/25 19:11:52 op Exp $   */
 
 /*
  * Copyright (c) 1980, 1993
@@ -264,7 +264,6 @@ whois(const char *query, const char *server, const char *port, int flags)
 
                /* Verisign etc. */
                if (!(flags & WHOIS_SPAM_ME) &&
-                   len >= sizeof(CHOPSPAM)-1 &&
                    (strncasecmp(buf, CHOPSPAM, sizeof(CHOPSPAM)-1) == 0 ||
                     strncasecmp(buf, &CHOPSPAM[4], sizeof(CHOPSPAM)-5) == 0)) {
                        printf("\n");