BUG/MEDIUM: fcgi: fix missing list tail in sample fetch registration

Ilya reported in bug #300 that ASAN found a read overflow during startup
in the fcgi code due to a missing empty element at the end of the list
of sample fetches. The effect is that will randomly either work or crash
on startup.

No backport is needed, this is solely for 2.1-dev.
This commit is contained in:
Willy Tarreau 2019-09-27 22:45:17 +02:00
parent 78c4306165
commit fc41e25c2e

View File

@ -1090,7 +1090,8 @@ static struct cfg_kw_list cfg_kws = {ILH, {
// FIXME: Add rep.fcgi smp_fetch // FIXME: Add rep.fcgi smp_fetch
static struct sample_fetch_kw_list sample_fetch_keywords = {ILH, { static struct sample_fetch_kw_list sample_fetch_keywords = {ILH, {
{ "fcgi.docroot", smp_fetch_fcgi_docroot, 0, NULL, SMP_T_STR, SMP_USE_HRQHV }, { "fcgi.docroot", smp_fetch_fcgi_docroot, 0, NULL, SMP_T_STR, SMP_USE_HRQHV },
{ "fcgi.index", smp_fetch_fcgi_index, 0, NULL, SMP_T_STR, SMP_USE_HRQHV } { "fcgi.index", smp_fetch_fcgi_index, 0, NULL, SMP_T_STR, SMP_USE_HRQHV },
{ /* END */ }
}}; }};
/* Declare the filter parser for "fcgi-app" keyword */ /* Declare the filter parser for "fcgi-app" keyword */