summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-11-03 23:51:37 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2017-11-03 23:51:37 -0400
commitda6b2dc1b6d1f1f975b0475d44b53dcbe8fcb0e6 (patch)
tree7bc1d72137ea2da0a5a92225b42acfa94d86aeb2
parenta9d1c46fb90f70a55e49518787399283c43dfd63 (diff)
downloadlighttpd1.4-da6b2dc1b6d1f1f975b0475d44b53dcbe8fcb0e6.tar.gz
lighttpd1.4-da6b2dc1b6d1f1f975b0475d44b53dcbe8fcb0e6.zip
[core] quiet coverity false positive
-rw-r--r--src/sock_addr.c1
-rw-r--r--src/test_configfile.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/sock_addr.c b/src/sock_addr.c
index 41fb92a0..f7ecb42d 100644
--- a/src/sock_addr.c
+++ b/src/sock_addr.c
@@ -308,6 +308,7 @@ int sock_addr_stringify_append_buffer(buffer *b, const sock_addr *saddr)
case AF_INET6:
buffer_append_string_len(b, CONST_STR_LEN("["));
if (0 != sock_addr_inet_ntop_append_buffer(b, saddr)) {
+ /* coverity[overflow_sink : FALSE] */
buffer_string_set_length(b, buffer_string_length(b)-1);
return -1;
}
diff --git a/src/test_configfile.c b/src/test_configfile.c
index 3618be40..251de631 100644
--- a/src/test_configfile.c
+++ b/src/test_configfile.c
@@ -47,7 +47,7 @@ static void test_configfile_addrbuf_eq_remote_ip_mask (void) {
sock_addr rmt;
for (i = 0; i < (int)(sizeof(rmtmask)/sizeof(rmtmask[0])); ++i) {
- sock_addr_inet_pton(&rmt, rmtmask[i].rmtstr, rmtmask[i].rmtfamily, 0);
+ if (1 != sock_addr_inet_pton(&rmt, rmtmask[i].rmtstr, rmtmask[i].rmtfamily, 0)) exit(-1); /*(bad test)*/
buffer_copy_string(s, rmtmask[i].string);
slash = strchr(s->ptr,'/'); assert(slash);
m = config_addrbuf_eq_remote_ip_mask(NULL, s, slash, &rmt);