mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity: 62458: coverity doesnt understand nonzero header length means simple_ptr cannot be NULL
This commit is contained in:
parent
9745c5cca8
commit
400355fdc3
1 changed files with 2 additions and 1 deletions
|
@ -1201,7 +1201,8 @@ lws_client_reset(struct lws **pwsi, int ssl, const char *address, int port,
|
|||
*/
|
||||
|
||||
for (n = 0; n < (int)LWS_ARRAY_SIZE(hnames2); n++)
|
||||
if (lws_hdr_total_length(wsi, hnames2[n])) {
|
||||
if (lws_hdr_total_length(wsi, hnames2[n]) &&
|
||||
lws_hdr_simple_ptr(wsi, hnames2[n])) {
|
||||
memcpy(p, lws_hdr_simple_ptr(wsi, hnames2[n]), (size_t)(
|
||||
lws_hdr_total_length(wsi, hnames2[n]) + 1));
|
||||
p += (size_t)(lws_hdr_total_length(wsi, hnames2[n]) + 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue