1
0
Fork 0
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:
Andy Green 2020-08-18 10:33:57 +01:00
parent 630391e0fb
commit 1892af1ce3

View file

@ -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;