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 1c1573c..f33cfb1 100644
--- a/src/fcgi-app.c
+++ b/src/fcgi-app.c
@@ -1090,7 +1090,8 @@
// 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 */