Browse Source

[core] quiet coverity warnings

master
Glenn Strauss 1 month ago
parent
commit
f99cb7d7ab
  1. 6
      src/http-header-glue.c
  2. 3
      src/network.c

6
src/http-header-glue.c

@ -833,6 +833,9 @@ static int http_response_process_headers(request_st * const restrict r, http_res
end[0] = '\0';
int status = http_header_str_to_code(value);
if (status >= 100 && status < 1000) {
#ifdef __COVERITY__ /* Coverity false positive for tainted */
status = 200;/* http_header_str_to_code() validates */
#endif
r->http_status = status;
opts->local_redir = 0; /*(disable; status was set)*/
}
@ -854,6 +857,9 @@ static int http_response_process_headers(request_st * const restrict r, http_res
end[0] = '\0';
int status = http_header_str_to_code(value);
if (status >= 100 && status < 1000) {
#ifdef __COVERITY__ /* Coverity false positive for tainted */
status = 200;/* http_header_str_to_code() validates */
#endif
r->http_status = status;
opts->local_redir = 0; /*(disable; status was set)*/
}

3
src/network.c

@ -735,6 +735,9 @@ int network_init(server *srv, int stdin_fd) {
buffer_append_string_len(b, CONST_STR_LEN(":"));
buffer_append_int(b, srv->srvconf.port);
}
#ifdef __COVERITY__
force_assert(b->ptr);
#endif
rc = network_server_init(srv, &p->defaults, b, 0, -1);
buffer_free(b);

Loading…
Cancel
Save