summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2000-03-28 16:41:45 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2000-03-28 16:41:45 +0000
commit46076808fbe2df8c847988d575f01a0ad7ad72c9 (patch)
tree3a6622279052ba8c078dc91d00fafd7dda31868e /src
parentadd003fd0c69640107cc1fb95794d44bfacd8781 (diff)
downloadtinyproxy-46076808fbe2df8c847988d575f01a0ad7ad72c9.tar.gz
tinyproxy-46076808fbe2df8c847988d575f01a0ad7ad72c9.zip
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.
Diffstat (limited to '')
-rw-r--r--src/reqs.c7
1 files changed, 6 insertions, 1 deletions
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);