From: Christopher Faulet Date: Tue, 24 Sep 2019 12:30:46 +0000 (+0200) Subject: BUG/MINOR: mux-fcgi: Use a literal string as format in app_log() X-Git-Tag: v2.1-dev2~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c45791aa5234de9e19821d7b109ef7487b2f43df;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-fcgi: Use a literal string as format in app_log() This avoid any crashes if stderr messages contain format specifiers. This patch partially fixes the issue #295. No backport needed. --- diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index ceff7fa623..267fdf190f 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -1931,7 +1931,7 @@ static int fcgi_strm_handle_stderr(struct fcgi_conn *fconn, struct fcgi_strm *fs trash.area[ret] = '\n'; trash.area[ret+1] = '\0'; tag.area = fconn->app->name; tag.data = strlen(fconn->app->name); - app_log(&fconn->app->logsrvs, &tag, LOG_ERR, trash.area); + app_log(&fconn->app->logsrvs, &tag, LOG_ERR, "%s", trash.area); if (fconn->drl) goto fail;