]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: fcgi: fix missing list tail in sample fetch registration
authorWilly Tarreau <w@1wt.eu>
Fri, 27 Sep 2019 20:45:17 +0000 (22:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 Sep 2019 20:48:27 +0000 (22:48 +0200)
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

index 1c1573c2525e08e3260cc1104b3fad9429d754db..f33cfb1a78376a88fcf7e3a7ee88f8685da90bae 100644 (file)
@@ -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 */