projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d03b12
)
parse_http_url(): Fail if no host is found when we expected one
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 4 May 2025 13:08:58 +0000
(15:08 +0200)
committer
Fabian Keil
<fk@fabiankeil.de>
Wed, 18 Jun 2025 03:48:30 +0000
(
05:48
+0200)
This can happen in case of invalid requests in which case
Privoxy priviously would leak a couple of bytes of memory.
urlmatch.c
patch
|
blob
|
history
diff --git
a/urlmatch.c
b/urlmatch.c
index
b6a61d9
..
b213c3e
100644
(file)
--- a/
urlmatch.c
+++ b/
urlmatch.c
@@
-326,6
+326,11
@@
jb_err parse_http_url(const char *url, struct http_request *http, int require_pr
if (!host_available)
{
+ if (!require_protocol)
+ {
+ log_error(LOG_LEVEL_ERROR, "No host found in request line.");
+ return JB_ERR_PARSE;
+ }
/* Without host, there is nothing left to do here */
return JB_ERR_OK;
}