Skip to content

Commit

Permalink
frang: fix possible null pointer dereference if request was generated…
Browse files Browse the repository at this point in the history
… by tempesta
  • Loading branch information
vankoven committed May 25, 2019
1 parent 0b1be60 commit 97abe3b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tempesta_fw/http_limits.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,11 @@ frang_resp_fwd_process(TfwHttpResp *resp)
: req->vhost->loc_dflt->frang_cfg;
FrangHttpRespCodeBlock *conf = fcfg->http_resp_code_block;

if (!conf)
/*
* Request may be originated form Health Monitor, thus it there may be
* no client connection.
*/
if (!req->conn || !conf)
return TFW_PASS;

ra = (FrangAcc *)req->conn->sk->sk_security;
Expand Down

0 comments on commit 97abe3b

Please sign in to comment.