Re: HELP: Failure of Squid 1.1.11 under Solaris 2.5.1

From: Duane Wessels <wessels@dont-contact.us>
Date: Tue, 28 Oct 97 19:16:31 -0800

ARMISTEJ@oeca.otis.com writes:

>As I understand it, the redirector (as I've implemented it) returns the
>whole redirector request line with the URL modified only if it sees any
>of the host name portions that match the search and reply operator.
>Basically as for the one out of the Release-Notes-1.1.txt file ** HINT
>** anyone want to improve the redirector documentation (it's a bit thin)
>????

No. The redirector should output only the new URL, or it can also
output a blank line to indicate no-change. However, we terminate
the reply buffer at the first space, so Squid should deal with it.

Your coredumps seem to indicate that Squid is writing to freed
memory, or exceeding array bounds. It might be due to this
bug which got fixed in 1.1.13:

        - Fixed string bounds bug if a redirector returns a short
          hostname which require appending 'append_domain' (David
          Lamkin).

Changelog doesn't mention any other redirector changes after 1.1.11.

Duane W.

Index: src/client_side.c
===================================================================
RCS file: /surf1/CVS/squid/src/client_side.c,v
retrieving revision 1.90.2.8
retrieving revision 1.90.2.10
diff -w -u -r1.90.2.8 -r1.90.2.10
--- client_side.c 1997/07/04 06:05:58 1.90.2.8
+++ client_side.c 1997/07/09 16:48:32 1.90.2.10
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.c,v 1.90.2.8 1997/07/04 06:05:58 wessels Exp $
+ * $Id: client_side.c,v 1.90.2.10 1997/07/09 16:48:32 wessels Exp $
  *
  * DEBUG: section 33 Client-side Routines
  * AUTHOR: Duane Wessels
@@ -260,6 +260,7 @@
 {
     icpStateData *icpState = data;
     int fd = icpState->fd;
+ int l;
     request_t *new_request = NULL;
     request_t *old_request = icpState->request;
     debug(33, 5, "clientRedirectDone: '%s' result=%s\n", icpState->url,
@@ -271,7 +272,12 @@
         new_request = urlParse(old_request->method, result);
     if (new_request) {
         safe_free(icpState->url);
- icpState->url = xstrdup(result);
+ /* need to malloc because the URL returned by the redirector might
+ * not be big enough to append the local domain
+ * -- David Lamkin drl@net-tel.co.uk */
+ l = strlen(result) + Config.appendDomainLen + 5;
+ icpState->url = xcalloc(l, 1);
+ xstrncpy(icpState->url, result, l);
         new_request->http_ver = old_request->http_ver;
         requestUnlink(old_request);
         icpState->request = requestLink(new_request);
Received on Tue Oct 28 1997 - 19:23:55 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:37:21 MST