summaryrefslogtreecommitdiff
path: root/src/journal/journald.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-05-21 19:31:41 +0200
committerMichal Schmidt <mschmidt@redhat.com>2012-05-21 20:03:26 +0200
commitfca1b90a0dd2800f8ec9e31ff0b942312b0b8bb0 (patch)
tree7ec0622494ab93d070fea15caf6ac8a7bbee4d32 /src/journal/journald.c
parent8f33b5b8b3e85f9c3b00eb004e601f7a72fa6461 (diff)
journald: fix length of "SYSLOG_IDENTIFIER="
Fixes weird messages like: May 20 22:23:30 jik2 TIFIER=systemd-logind[795]: New session 46 of user gdm. https://bugzilla.redhat.com/show_bug.cgi?id=823498
Diffstat (limited to 'src/journal/journald.c')
-rw-r--r--src/journal/journald.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c
index a6f27f6ef4..1093f3c9c8 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -1235,10 +1235,10 @@ static void process_native_message(
priority = (priority & LOG_PRIMASK) | (((p[16] - '0')*10 + (p[17] - '0')) << 3);
else if (l >= 12 &&
- memcmp(p, "SYSLOG_IDENTIFIER=", 11) == 0) {
+ memcmp(p, "SYSLOG_IDENTIFIER=", 18) == 0) {
char *t;
- t = strndup(p + 11, l - 11);
+ t = strndup(p + 18, l - 18);
if (t) {
free(identifier);
identifier = t;