]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-fcgi: Use a literal string as format in app_log()
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 24 Sep 2019 12:30:46 +0000 (14:30 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 24 Sep 2019 12:30:49 +0000 (14:30 +0200)
This avoid any crashes if stderr messages contain format specifiers.

This patch partially fixes the issue #295. No backport needed.

src/mux_fcgi.c

index ceff7fa623d39ea766e670463bd6f5aadd83adff..267fdf190f9d008ec6b7cad56b328c20861d8866 100644 (file)
@@ -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;