summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-12-23 21:31:07 +0100
committerLennart Poettering <lennart@poettering.net>2015-12-23 21:31:07 +0100
commit838c669055ddbbd04998ffc345a81f6fddbb9cfe (patch)
tree1115907b1d2155b6427a3cc01db333ab8d44dcd6 /src/journal/sd-journal.c
parentd6ef10fadfe757c8f0a5664097978b4f4d0f430e (diff)
parentae5e1b19e78ed85259868d12ca8042fd2e87d423 (diff)
Merge pull request #2158 from keszybz/journal-decompression
Journal decompression fixes
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 5cde7f17f7..cd5160154a 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1940,10 +1940,14 @@ _public_ int sd_journal_get_data(sd_journal *j, const char *field, const void **
compression = o->object.flags & OBJECT_COMPRESSION_MASK;
if (compression) {
#if defined(HAVE_XZ) || defined(HAVE_LZ4)
- if (decompress_startswith(compression,
+ r = decompress_startswith(compression,
o->data.payload, l,
&f->compress_buffer, &f->compress_buffer_size,
- field, field_length, '=')) {
+ field, field_length, '=');
+ if (r < 0)
+ log_debug_errno(r, "Cannot decompress %s object of length %zu at offset "OFSfmt": %m",
+ object_compressed_to_string(compression), l, p);
+ else if (r > 0) {
size_t rsize;