mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity: 40529: add needless check on NULL simple_ptr after confirmed it has nonzero length
This commit is contained in:
parent
630391e0fb
commit
1892af1ce3
1 changed files with 3 additions and 0 deletions
|
@ -1507,6 +1507,9 @@ lws_http_action(struct lws *wsi)
|
|||
if (!n || n > 128)
|
||||
goto bail_nuke_ah;
|
||||
|
||||
if (!lws_hdr_simple_ptr(wsi, WSI_TOKEN_HOST))
|
||||
goto bail_nuke_ah;
|
||||
|
||||
p += lws_snprintf((char *)p, lws_ptr_diff(end, p), "https://");
|
||||
memcpy(p, lws_hdr_simple_ptr(wsi, WSI_TOKEN_HOST), n);
|
||||
p += n;
|
||||
|
|
Loading…
Add table
Reference in a new issue