Browse Source

[core] quiet coverity false positive

personal/stbuehler/1.4.48-mod-proxy-fix
Glenn Strauss 4 years ago
parent
commit
da6b2dc1b6
  1. 1
      src/sock_addr.c
  2. 2
      src/test_configfile.c

1
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;
}

2
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);

Loading…
Cancel
Save