1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

coverity: use function comments to clear false positives

This commit is contained in:
Andy Green 2019-10-08 11:27:36 +01:00
parent db760fa164
commit ba8402b43f
4 changed files with 4 additions and 1 deletions

View file

@ -728,7 +728,7 @@ lws_create_vhost(struct lws_context *context,
p = getenv("http_proxy");
if (p) {
lws_strncpy(buf, p, sizeof(buf));
/* coverity[tainted_scalar] */
lws_set_proxy(vh, buf);
}
#endif

View file

@ -850,6 +850,7 @@ lws_client_interpret_server_handshake(struct lws *wsi)
*/
lwsl_err("Redirect failed\n");
cce = "HS: Redirect failed";
/* coverity[reverse_inull] */
if (wsi)
goto bail3;

View file

@ -163,6 +163,7 @@ lws_generate_client_ws_handshake(struct lws *wsi, char *p, const char *conn1)
return NULL;
}
/* coverity[tainted_scalar] */
lws_b64_encode_string(hash, 16, key_b64, sizeof(key_b64));
p += sprintf(p, "Upgrade: websocket\x0d\x0a"

View file

@ -169,6 +169,7 @@ scan_upload_dir(struct vhd_deaddrop *vhd)
if (de->d_name[strlen(de->d_name) - 1] == '~')
continue;
/* coverity[toctou] */
if (stat(filepath, &s))
continue;