From d5e17be51470ed4bb020bab3fc8bc5fc6af0250d Mon Sep 17 00:00:00 2001 From: wessels <> Date: Thu, 21 May 1998 02:46:50 +0000 Subject: [PATCH] Fixed matchDomainName array bounds bug -- potentially checking before the beginning of a string. --- src/url.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.47.3