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.
This commit is contained in:
Christopher Faulet 2019-09-24 14:30:46 +02:00
parent 82c798a082
commit c45791aa52

View 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;