diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-12-02 04:53:23 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-12-02 15:50:01 +0100 |
commit | b3aa622929f81b44974d182636b1fde8b2a506e5 (patch) | |
tree | 9b4160bfbeabd669a7eef32b8e4cf45d79fe2b2f /src/journal/compress.c | |
parent | tests: fix newlines in skip message (diff) | |
download | systemd-b3aa622929f81b44974d182636b1fde8b2a506e5.tar.xz systemd-b3aa622929f81b44974d182636b1fde8b2a506e5.zip |
lz4: fix size check which had no chance of working on big-endian
Diffstat (limited to '')
-rw-r--r-- | src/journal/compress.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/compress.c b/src/journal/compress.c index e1ca0a8818..1a3d2cdd80 100644 --- a/src/journal/compress.c +++ b/src/journal/compress.c @@ -201,7 +201,7 @@ int decompress_blob_lz4(const void *src, uint64_t src_size, return -EBADMSG; size = le64toh( *(le64_t*)src ); - if (size < 0 || (le64_t) size != *(le64_t*)src) + if (size < 0 || (unsigned) size != le64toh(*(le64_t*)src)) return -EFBIG; if ((size_t) size > *dst_alloc_size) { out = realloc(*dst, size); |