projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a136543
)
host_matches(): Assert that the host pointer isn't NULL
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 27 Dec 2015 12:47:17 +0000
(12:47 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sun, 27 Dec 2015 12:47:17 +0000
(12:47 +0000)
urlmatch.c
patch
|
blob
|
history
diff --git
a/urlmatch.c
b/urlmatch.c
index
ed7399b
..
de0b9bb
100644
(file)
--- a/
urlmatch.c
+++ b/
urlmatch.c
@@
-1,4
+1,4
@@
-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.8
4 2014/06/20 09:47:10
fabiankeil Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.8
5 2014/07/25 11:56:26
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
@@
-1281,6
+1281,7
@@
static int port_matches(const int port, const char *port_list)
static int host_matches(const struct http_request *http,
const struct pattern_spec *pattern)
{
static int host_matches(const struct http_request *http,
const struct pattern_spec *pattern)
{
+ assert(http->host != NULL);
#ifdef FEATURE_EXTENDED_HOST_PATTERNS
return ((NULL == pattern->pattern.url_spec.host_regex)
|| (0 == regexec(pattern->pattern.url_spec.host_regex, http->host, 0, NULL, 0)));
#ifdef FEATURE_EXTENDED_HOST_PATTERNS
return ((NULL == pattern->pattern.url_spec.host_regex)
|| (0 == regexec(pattern->pattern.url_spec.host_regex, http->host, 0, NULL, 0)));