From: Christos Tsantilas Date: Sat, 7 Aug 2010 15:38:22 +0000 (+0300) Subject: Bug fix: In the case of an error while accessing a gopher server, squid will crash X-Git-Tag: take1~413 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2b3e30eb664aa1c87e95a1d48e41cd7796481d2;p=thirdparty%2Fsquid.git Bug 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 70e6352f8d..75c821c568 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -899,7 +899,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);