From 0070c296459dd3318b99125f803dc793fb8d72e7 Mon Sep 17 00:00:00 2001 From: jmccrohan Date: Sat, 19 May 2012 12:46:24 +0000 Subject: Mitigate format string exploits error: format not a string literal and no format arguments [-Werror=format-security] Signed-off-by: Jonathan McCrohan git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1189 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- drv_PHAnderson.c | 2 +- drv_SamsungSPF.c | 2 +- plugin_button_exec.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drv_PHAnderson.c b/drv_PHAnderson.c index 667d0b0..4cf618b 100644 --- a/drv_PHAnderson.c +++ b/drv_PHAnderson.c @@ -267,7 +267,7 @@ static int drv_PHAnderson_start(const char *section) } s = cfg_get(section, "Bootscreen", NULL); - printf(s); + printf("%s", s); drv_PHAnderson_bootscreen(s); drv_PHAnderson_clear(); /* clear display */ diff --git a/drv_SamsungSPF.c b/drv_SamsungSPF.c index 4e548b3..69f07cf 100644 --- a/drv_SamsungSPF.c +++ b/drv_SamsungSPF.c @@ -388,7 +388,7 @@ int drv_SamsungSPF_list(void) printf("SamsungSPF driver, supported models ["); for (i = 0; i < numFrames; i++) { - printf(spfDevices[i].type); + printf("%s", spfDevices[i].type); if (i < numFrames - 1) printf(", "); } diff --git a/plugin_button_exec.c b/plugin_button_exec.c index 7685841..3cc306e 100644 --- a/plugin_button_exec.c +++ b/plugin_button_exec.c @@ -67,11 +67,11 @@ static void my_button_exec(RESULT * result, int argc, RESULT * argv[]) signal(SIGCHLD, SIG_IGN); prog = R2S(argv[0]); - info(prog); + info("%s", prog); for (i = 1; i < argc; i++) { arg = R2S(argv[i]); args[i] = arg; - info(arg); + info("%s", arg); } args[0] = prog; args[i] = (char *) 0; @@ -82,7 +82,7 @@ static void my_button_exec(RESULT * result, int argc, RESULT * argv[]) execvp(prog, args); errsv = errno; info("executing program failed"); - info(strerror(errsv)); + info("%s", strerror(errsv)); exit(0); } else if (pid == -1) { info("weird error has occurred. couldn't fork."); -- cgit v1.2.3