tpws : fix possible null pointer dereference

This commit is contained in:
bolvan 2018-06-07 17:59:56 +03:00
parent 21bc7a8727
commit 5124817a41
7 changed files with 98 additions and 98 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -275,7 +275,7 @@ bool handle_epollin(tproxy_conn_t *conn, int *data_transferred) {
} }
} }
if (params.hostnospace && pHost[5] == ' ' && find_host(&pHost,buf,bs)) if (params.hostnospace && find_host(&pHost,buf,bs) && pHost[5] == ' ')
{ {
p = pHost + 6; p = pHost + 6;
pos = p - buf; pos = p - buf;