From fc41e25c2ea29fd5b4558683627f2d34ae2892d4 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 27 Sep 2019 22:45:17 +0200 Subject: [PATCH] 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. --- src/fcgi-app.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fcgi-app.c b/src/fcgi-app.c index 1c1573c25..f33cfb1a7 100644 --- a/src/fcgi-app.c +++ b/src/fcgi-app.c @@ -1090,7 +1090,8 @@ static struct cfg_kw_list cfg_kws = {ILH, { // FIXME: Add rep.fcgi smp_fetch 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.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 */