summaryrefslogtreecommitdiff
path: root/src/shared/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/log.c')
-rw-r--r--src/shared/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/log.c b/src/shared/log.c
index ba959b914e..d87f43f5a4 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -366,7 +366,7 @@ static int write_to_syslog(
const char *object,
const char *buffer) {
- char header_priority[16], header_time[64], header_pid[16];
+ char header_priority[1 + DECIMAL_STR_MAX(int) + 2], header_time[64], header_pid[1 + DECIMAL_STR_MAX(pid_t) + 4];
struct iovec iovec[5] = {};
struct msghdr msghdr = {
.msg_iov = iovec,
@@ -429,7 +429,7 @@ static int write_to_kmsg(
const char *object,
const char *buffer) {
- char header_priority[16], header_pid[16];
+ char header_priority[1 + DECIMAL_STR_MAX(int) + 2], header_pid[1 + DECIMAL_STR_MAX(pid_t) + 4];
struct iovec iovec[5] = {};
if (kmsg_fd < 0)