From 46076808fbe2df8c847988d575f01a0ad7ad72c9 Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Tue, 28 Mar 2000 16:41:45 +0000 Subject: Fixed another NULL bug with the uri->authority. If an badly formed request was made in the form of http:\\www.somewhere.com/ tinyproxy would SEGV. This has been corrected. --- src/reqs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/reqs.c b/src/reqs.c index 10efa89..d7c5227 100644 --- a/src/reqs.c +++ b/src/reqs.c @@ -1,4 +1,4 @@ -/* $Id: reqs.c,v 1.3 2000-03-28 16:19:12 rjkaes Exp $ +/* $Id: reqs.c,v 1.4 2000-03-28 16:41:45 rjkaes Exp $ * * This is where all the work in tinyproxy is actually done. Incoming * connections are added to the active list of connections and then the header @@ -183,6 +183,11 @@ static int clientreq(struct conn_s *connptr) goto COMMON_EXIT; } + if (!uri->authority) { + httperr(connptr, 400, "Invalid authority."); + goto COMMON_EXIT; + } + if ((strlen(config.stathost) > 0) && strcasecmp(uri->authority, config.stathost) == 0) { showstats(connptr); -- cgit v1.2.3