From b2313ef4a887e11b2008f9109e3741b7def88370 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kai=20Wasserb=C3=A4ch?= Date: Sat, 25 Aug 2018 12:00:30 +0200 Subject: [PATCH] intel: tools: Fix aubinator_error's fprintf call (format-security) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The recent commit 4616639b49b4bbc91e503c1c27632dccc1c2b5be introduced the new function aubinator_error() which is a trivial wrapper around fprintf() to STDERR. The call to fprintf() however is passed the message msg directly: fprintf(stderr, msg); This is a format-security violation and leads to an FTBFS with -Werror=format-security (GCC 8): ../../../src/intel/tools/aubinator.c: In function 'aubinator_error': ../../../src/intel/tools/aubinator.c:74:4: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, msg); ^~~~~~~ This patch fixes this trivially by introducing a catch-all "%s" format argument. Fixes: 4616639b49b ("intel: tools: split aub parsing from aubinator") Cc: Lionel Landwerlin Signed-off-by: Kai Wasserbäch Reviewed-by: Lionel Landwerlin --- src/intel/tools/aubinator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c index 374ed46..c22d191 100644 --- a/src/intel/tools/aubinator.c +++ b/src/intel/tools/aubinator.c @@ -71,7 +71,7 @@ struct brw_instruction; static void aubinator_error(void *user_data, const void *aub_data, const char *msg) { - fprintf(stderr, msg); + fprintf(stderr, "%s", msg); } static void -- 2.7.4