From: wessels <> Date: Wed, 10 Apr 1996 11:06:38 +0000 (+0000) Subject: preemptive checks in url_hex_convert X-Git-Tag: SQUID_3_0_PRE1~6235 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d863806ad42547e517bd060c05f6e27f9715788;p=thirdparty%2Fsquid.git preemptive checks in url_hex_convert --- diff --git a/src/url.cc b/src/url.cc index 35e3fcff30..809c0319de 100644 --- a/src/url.cc +++ b/src/url.cc @@ -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;