mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity: 2019.03 fixes
This commit is contained in:
parent
75ef709ff7
commit
e4ec282987
2 changed files with 6 additions and 5 deletions
|
@ -694,7 +694,7 @@ lws_create_vhost(struct lws_context *context,
|
|||
{
|
||||
#ifdef LWS_HAVE_GETENV
|
||||
p = getenv("http_proxy");
|
||||
if (p)
|
||||
if (p && strlen(p) > 0 && strlen(p) < 95)
|
||||
lws_set_proxy(vh, p);
|
||||
#endif
|
||||
}
|
||||
|
@ -709,7 +709,7 @@ lws_create_vhost(struct lws_context *context,
|
|||
} else {
|
||||
#ifdef LWS_HAVE_GETENV
|
||||
p = getenv("socks_proxy");
|
||||
if (p)
|
||||
if (p && strlen(p) > 0 && strlen(p) < 95)
|
||||
lws_set_socks(vh, p);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -280,9 +280,10 @@ socks_reply_fail:
|
|||
}
|
||||
|
||||
pt->serv_buf[13] = '\0';
|
||||
if (strcmp(sb, "HTTP/1.0 200 ") &&
|
||||
strcmp(sb, "HTTP/1.1 200 ")) {
|
||||
lwsl_err("ERROR proxy: %s\n", sb);
|
||||
if (strncmp(sb, "HTTP/1.0 200 ", 13) &&
|
||||
strncmp(sb, "HTTP/1.1 200 ", 13)) {
|
||||
lwsl_err("%s: ERROR proxy did not reply with h1\n",
|
||||
__func__);
|
||||
goto bail3;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue