Code

patches: Added format-security; fixing a missing printf-style format argument.
[pkg-pnp4nagios.git] / debian / patches / format-security
1 Description: Fixed a missing printf-style format argument.
2  This was identified by GCC's format-security check which forbids any non
3  string literals to be used as format argument.
4 Author: Sebastian Harl <tokkee@debian.org>
5 Forwarded: yes
7 diff a/src/logging.c b/src/logging.c
8 --- a/src/logging.c
9 +++ b/src/logging.c
10 @@ -27,7 +27,7 @@ extern int max_logfile_size;
11  
12  int do_log(char *message) {
13         if (use_syslog) {
14 -               syslog(LOG_NOTICE, message);
15 +               syslog(LOG_NOTICE, "%s", message);
16                 return OK;
17         } else if (use_syslog == FALSE) {
18                 if (write_log(message)==0)