]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix off-by-1 in urlpath_regex
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 28 Jul 2015 15:32:29 +0000 (08:32 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 28 Jul 2015 15:32:29 +0000 (08:32 -0700)
src/acl/UrlPath.cc

index eb4e04007fbe136f8d35c9b33232c916e2f9364c..513500467b40ff3585bb412799e71cdf403c14d6 100644 (file)
@@ -22,7 +22,7 @@ ACLUrlPathStrategy::match (ACLData<char const *> * &data, ACLFilledChecklist *ch
         return -1;
 
     SBuf tmp = checklist->request->url.path();
-    char *esc_buf = xstrndup(tmp.rawContent(), tmp.length());
+    char *esc_buf = xstrndup(tmp.rawContent(), tmp.length()+1);
     rfc1738_unescape(esc_buf);
     int result = data->match(esc_buf);
     xfree(esc_buf);