Mitigate format string exploits

error: format not a string literal and no format arguments
[-Werror=format-security]

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1189 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
This commit is contained in:
jmccrohan
2012-05-19 12:46:24 +00:00
parent b0fd4a3383
commit 0070c29645
3 changed files with 5 additions and 5 deletions

View File

@@ -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 */

View File

@@ -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(", ");
}

View File

@@ -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.");