diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-07-08 18:01:52 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-07-08 22:51:32 -0400 |
commit | 28f1867c11d4e5b7ab0e263caf45441fc6237767 (patch) | |
tree | 0999c095c31cdc2e5ecf116110608f4a69d55df7 /src/mod_extforward.c | |
parent | 98a224a4a286688d87f7c80dbf5a3a202f0f89d5 (diff) | |
download | lighttpd-git-28f1867c11d4e5b7ab0e263caf45441fc6237767.tar.gz |
quiet clang analyzer scan-build warnings
(expansion of buffer_string_lenth() inline function and CONST_BUF_LEN()
macro, which always check for NULL, appears to cause the analyzer to
believe that a pointer might be NULL in cases where it otherwise can
not be NULL)
x-ref:
http://clang-analyzer.llvm.org/faq.html
Diffstat (limited to 'src/mod_extforward.c')
-rw-r--r-- | src/mod_extforward.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_extforward.c b/src/mod_extforward.c index cca5c4b9..9c8594d4 100644 --- a/src/mod_extforward.c +++ b/src/mod_extforward.c @@ -501,7 +501,7 @@ static int is_proxy_trusted(plugin_data *p, const char * const ip, size_t iplen) sock_addr addr; /* C funcs inet_aton(), inet_pton() require '\0'-terminated IP str */ char addrstr[64]; /*(larger than INET_ADDRSTRLEN and INET6_ADDRSTRLEN)*/ - if (iplen >= sizeof(addrstr)) return 0; + if (0 == iplen || iplen >= sizeof(addrstr)) return 0; memcpy(addrstr, ip, iplen); addrstr[iplen] = '\0'; @@ -843,6 +843,7 @@ static handler_t mod_extforward_Forwarded (request_st * const r, plugin_data * c /* parse out params associated with for=<ip> addr set above */ oproto = ohost = oby = oremote_user = -1; + UNUSED(oby); j = ofor; if (j > 0) { do { --j; } while (j > 0 && -1 != offsets[j]); } if (-1 == offsets[j]) ++j; |