From: Amos Jeffries Date: Wed, 18 Aug 2010 01:38:05 +0000 (-0600) Subject: Author: Christos Tsantilas X-Git-Tag: SQUID_3_1_7~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=102cdb7b86366be5ae0a3d07017552d3ad97f326;p=thirdparty%2Fsquid.git Author: Christos Tsantilas Fix: In the case of an error while accessing a gopher server, squid will crash The GopherStateData::req used to retrieve the releated HttpRequest object in gopherSendComplete function when a server while accessing the server occurs. The GopherStateData::req is never assigned and it is always NULL (should be removed?). The gopherState->fwd->request must be used instead. --- diff --git a/src/gopher.cc b/src/gopher.cc index 293059ee46..e04c05d18e 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -892,7 +892,7 @@ gopherSendComplete(int fd, char *buf, size_t size, comm_err_t errflag, int xerrn ErrorState *err; err = errorCon(ERR_WRITE_ERROR, HTTP_SERVICE_UNAVAILABLE, gopherState->fwd->request); err->xerrno = errno; - err->port = gopherState->req->port; + err->port = gopherState->fwd->request->port; err->url = xstrdup(entry->url()); gopherState->fwd->fail(err); comm_close(fd);