From: Zbigniew Jędrzejewski-Szmek Date: Wed, 2 Dec 2015 03:53:23 +0000 (-0500) Subject: lz4: fix size check which had no chance of working on big-endian X-Git-Tag: v229~241^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2084%2Fhead;p=thirdparty%2Fsystemd.git lz4: fix size check which had no chance of working on big-endian --- diff --git a/src/journal/compress.c b/src/journal/compress.c index e1ca0a8818e..1a3d2cdd800 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);