From: wessels <> Date: Thu, 21 May 1998 02:46:50 +0000 (+0000) Subject: Fixed matchDomainName array bounds bug -- potentially checking before X-Git-Tag: SQUID_3_0_PRE1~3308 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d5e17be51470ed4bb020bab3fc8bc5fc6af0250d;p=thirdparty%2Fsquid.git Fixed matchDomainName array bounds bug -- potentially checking before the beginning of a string. --- diff --git a/src/url.cc b/src/url.cc index f5408fa5ce..83c7c1f224 100644 --- a/src/url.cc +++ b/src/url.cc @@ -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; }