]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
preemptive checks in url_hex_convert
authorwessels <>
Wed, 10 Apr 1996 11:06:38 +0000 (11:06 +0000)
committerwessels <>
Wed, 10 Apr 1996 11:06:38 +0000 (11:06 +0000)
src/url.cc

index 35e3fcff3038c82c7d74f706ebbcfa55e95e2823..809c0319dec0a63d9924dcd48901ab15833fc586 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: url.cc,v 1.8 1996/04/10 03:54:45 wessels Exp $ */
+/* $Id: url.cc,v 1.9 1996/04/10 05:06:38 wessels Exp $ */
 
 /* 
  * DEBUG: Section 23          url
@@ -25,6 +25,9 @@ char *url_convert_hex(org_url, allocate)
 
     url = allocate ? (char *) xstrdup(org_url) : org_url;
 
+    if (strlen(url) < 3 || !strchr(url, '%'))
+       return url;
+
     for (s = t = url; *(s + 2); s++) {
        if (*s == '%') {
            *code = *++s;