mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 18:55:40 +03:00
journald: fix some xsprrintf() buffer size fallout
This commit is contained in:
parent
86caf09519
commit
3b97fcbd28
@ -40,7 +40,7 @@ void server_forward_kmsg(
|
||||
const struct ucred *ucred) {
|
||||
|
||||
struct iovec iovec[5];
|
||||
char header_priority[4],
|
||||
char header_priority[DECIMAL_STR_MAX(priority) + 3],
|
||||
header_pid[sizeof("[]: ")-1 + DECIMAL_STR_MAX(pid_t) + 1];
|
||||
int n = 0;
|
||||
char *ident_buf = NULL;
|
||||
|
@ -124,7 +124,7 @@ static void forward_syslog_raw(Server *s, int priority, const char *buffer, cons
|
||||
|
||||
void server_forward_syslog(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred, const struct timeval *tv) {
|
||||
struct iovec iovec[5];
|
||||
char header_priority[4], header_time[64],
|
||||
char header_priority[DECIMAL_STR_MAX(priority) + 3], header_time[64],
|
||||
header_pid[sizeof("[]: ")-1 + DECIMAL_STR_MAX(pid_t) + 1];
|
||||
int n = 0;
|
||||
time_t t;
|
||||
|
Loading…
Reference in New Issue
Block a user