From: Willy Tarreau Date: Fri, 27 Sep 2019 20:45:17 +0000 (+0200) Subject: BUG/MEDIUM: fcgi: fix missing list tail in sample fetch registration X-Git-Tag: v2.1-dev2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc41e25c2ea29fd5b4558683627f2d34ae2892d4;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/fcgi-app.c b/src/fcgi-app.c index 1c1573c252..f33cfb1a78 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 */