From c45791aa5234de9e19821d7b109ef7487b2f43df Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 24 Sep 2019 14:30:46 +0200 Subject: [PATCH] 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. --- src/mux_fcgi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index ceff7fa62..267fdf190 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;