From d2b3e30eb664aa1c87e95a1d48e41cd7796481d2 Mon Sep 17 00:00:00 2001 From: Christos Tsantilas Date: Sat, 7 Aug 2010 18:38:22 +0300 Subject: [PATCH] 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. --- src/gopher.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.2