summaryrefslogtreecommitdiff
path: root/src/journal/journald.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journald.c')
-rw-r--r--src/journal/journald.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 87390bdec9..f0f5103bf0 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -1258,6 +1258,7 @@ static void process_native_message(
p = e + 1;
continue;
} else {
+ le64_t l_le;
uint64_t l;
char *k;
@@ -1266,8 +1267,8 @@ static void process_native_message(
break;
}
- memcpy(&l, e + 1, sizeof(uint64_t));
- l = le64toh(l);
+ memcpy(&l_le, e + 1, sizeof(uint64_t));
+ l = le64toh(l_le);
if (remaining < e - p + 1 + sizeof(uint64_t) + l + 1 ||
e[1+sizeof(uint64_t)+l] != '\n') {