As reported by @kenballus in GH #3118, a potential NULL-deref was
introduced in
3da1d63 ("BUG/MEDIUM: http_ana: handle yield for "stats
http-request" evaluation")
Indeed, px->uri_auth may be NULL when stats directive is not involved in
the current proxy section.
The bug went unnoticed because it didn't seem to cause any side-effect
so far and valgrind didn't catch it. However ASAN did, so let's fix it
before it causes harm.
It should be backported with
3da1d63.
verdict = HTTP_RULE_RES_CONT;
- if (s->current_rule_list == &px->uri_auth->http_req_rules)
+ if (px->uri_auth && s->current_rule_list == &px->uri_auth->http_req_rules)
stats_rules = 1;
/* resume stats http-request rules if needed */