diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2000-03-28 16:41:45 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2000-03-28 16:41:45 +0000 |
commit | 46076808fbe2df8c847988d575f01a0ad7ad72c9 (patch) | |
tree | 3a6622279052ba8c078dc91d00fafd7dda31868e /src | |
parent | add003fd0c69640107cc1fb95794d44bfacd8781 (diff) | |
download | tinyproxy-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 'src')
-rw-r--r-- | src/reqs.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); |