mirror of
https://github.com/netfun2000/lcd4linux.git
synced 2026-02-27 09:44:34 +08:00
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:
@@ -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 */
|
||||
|
||||
@@ -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(", ");
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user