Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 10818 invoked by uid 6000); 7 Nov 1997 16:28:45 -0000 Received: (qmail 10811 invoked from network); 7 Nov 1997 16:28:43 -0000 Received: from thoth.mch.sni.de (192.35.17.2) by taz.hyperreal.org with SMTP; 7 Nov 1997 16:28:43 -0000 Received: from deejai.mch.sni.de (deejai.mch.sni.de [139.25.113.10]) by thoth.mch.sni.de (8.8.8/8.8.8) with ESMTP id RAA05530 for ; Fri, 7 Nov 1997 17:28:41 +0100 (MET) Received: (from martin@localhost) by deejai.mch.sni.de (8.8.7/8.8.7) id RAA04751; Fri, 7 Nov 1997 17:28:39 +0100 (MET) Message-ID: <19971107172837.26690@deejai.mch.sni.de> Date: Fri, 7 Nov 1997 17:28:37 +0100 From: Martin Kraemer To: new-httpd@apache.org Subject: [PATCH] Minor off-by-one error Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="o7xgI/oilGqZ+PHC" X-Mailer: Mutt 0.85 X-Face: %0^)uynSVIl4|'Kt4&K^"0e)QSD,RsmBJzgofk.'s$bu*4XXru?d/!|;"x{U(7 X-Operating-System: SINIX-D 5.41 C1001 X-Organization: Siemens-Nixdorf Informationssysteme AG (Muenchen, W.Germany) X-Phone: +49-89-636-46021 X-Fax: +49-89-636-44994 X-Disclaimer: THE COMMENTS CONTAINED IN THIS MESSAGE REFLECT THE VIEWS OF THE WRITER AND ARE NOT NECESSARILY THE VIEWS OF SIEMENS NIXDORF AG X-No-Junk-Mail: I do not want to get *any* junk mail. Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org --o7xgI/oilGqZ+PHC Content-Type: text/plain; charset=us-ascii You might want to re-check this: > ports=strchr(ips, ':'); > if (ports != NULL) > { > if (ports == ips) return "Missing IP address"; > else if (ports[0] == '\0') >>> ^^^This should be [0], right? >>> Otherwise the if() is never executed. > return "Address must end in :"; > *(ports++) = '\0'; > } else > ports = ips; A patch is appended. Martin -- | S I E M E N S | | Siemens Nixdorf | ------------- | Voice: +49-89-636-46021 | Informationssysteme AG | N I X D O R F | FAX: +49-89-636-44994 | 81730 Munich, Germany ~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request --o7xgI/oilGqZ+PHC Content-Type: text/plain; charset=us-ascii Content-Description: Off-By-One Content-Disposition: attachment; filename="core1.patch" --- /home/martin/pgtm0035/apachen/src/main/http_core.c.bak Wed Nov 5 14:50:03 1997 +++ /home/martin/pgtm0035/apachen/src/main/http_core.c Fri Nov 7 15:57:45 1997 @@ -1414,7 +1414,7 @@ if (ports != NULL) { if (ports == ips) return "Missing IP address"; - else if (ports[0] == '\0') + else if (ports[1] == '\0') return "Address must end in :"; *(ports++) = '\0'; } else --o7xgI/oilGqZ+PHC--