mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
COVA10117: help coverity see uri is always set
The _WSI_TOKEN_CLIENT_URI private header was always set to something by the client api before this. Help Coverity understand it's OK.
This commit is contained in:
parent
4da5b63e57
commit
6dd65e2d75
1 changed files with 6 additions and 1 deletions
|
@ -822,8 +822,13 @@ lws_client_interpret_server_handshake(struct lws *wsi)
|
|||
port = wsi->c_port;
|
||||
/* +1 as lws_client_reset expects leading / omitted */
|
||||
path = new_path + 1;
|
||||
lws_strncpy(new_path, lws_hdr_simple_ptr(wsi,
|
||||
if (lws_hdr_simple_ptr(wsi,_WSI_TOKEN_CLIENT_URI))
|
||||
lws_strncpy(new_path, lws_hdr_simple_ptr(wsi,
|
||||
_WSI_TOKEN_CLIENT_URI), sizeof(new_path));
|
||||
else {
|
||||
new_path[0] = '/';
|
||||
new_path[1] = '\0';
|
||||
}
|
||||
q = strrchr(new_path, '/');
|
||||
if (q)
|
||||
lws_strncpy(q + 1, p, sizeof(new_path) -
|
||||
|
|
Loading…
Add table
Reference in a new issue