]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed matchDomainName array bounds bug -- potentially checking before
authorwessels <>
Thu, 21 May 1998 02:46:50 +0000 (02:46 +0000)
committerwessels <>
Thu, 21 May 1998 02:46:50 +0000 (02:46 +0000)
the beginning of a string.

src/url.cc

index f5408fa5ce6f209cd4382a4ef346ea03181e7b2d..83c7c1f224faa8bdef4551fb556339097ebb111f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.cc,v 1.92 1998/05/11 18:44:47 rousskov Exp $
+ * $Id: url.cc,v 1.93 1998/05/20 20:46:50 wessels Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -391,10 +391,10 @@ matchDomainName(const char *domain, const char *host)
        return 0;               /* no match at all */
     if (*domain == '.')
        return 1;
-    if (*(host + offset - 1) == '.')
-       return 1;
     if (offset == 0)
        return 1;
+    if (*(host + offset - 1) == '.')
+       return 1;
     return 0;
 }