Blob Blame Raw
From c8dfa956e1732bd73ae44721ec5092b56740bcf5 Mon Sep 17 00:00:00 2001
From: Dave Love <dave.love@manchester.ac.uk>
Date: Sun, 14 May 2017 16:44:59 +0100
Subject: [PATCH 02/30] Make syslog call format safe

---
 src/lib/message.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/lib/message.c b/src/lib/message.c
index 8d010cc8..dbaba509 100644
--- a/src/lib/message.c
+++ b/src/lib/message.c
@@ -102,10 +102,7 @@ void _singularity_message(int level, const char *function, const char *file, int
     }
 
     if ( level <= LOG ) {
-        char syslog_string[540]; // Flawfinder: ignore (512 max message length + 28'ish chars for header)
-        snprintf(syslog_string, 540, "%s (U=%d,P=%d)> %s", __progname, geteuid(), getpid(), message); // Flawfinder: ignore
-
-        syslog(syslog_level, syslog_string, strlength(syslog_string, 1024)); // Flawfinder: ignore (format is internally defined)
+        syslog(syslog_level, "%s (U=%d,P=%d)> %s", __progname, geteuid(), getpid(), message);
     }
 
     if ( level <= messagelevel ) {
-- 
2.11.0