diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-13 11:15:41 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-02-13 11:15:41 +0100 |
commit | 91ba5ac7d0196074863ff08f5251689d324a6550 (patch) | |
tree | c12c05be46f21a42d30f2bf1b46d1207db49db89 /src/journal/journal-file.c | |
parent | 6c3bedd5cfef5c70185fbbac33829c5c11686669 (diff) | |
parent | 718af59e9ac1a525b0a73b99a74bc376f1b4d49d (diff) |
Merge pull request #2589 from keszybz/resolve-tool-2
Better support of OPENPGPKEY, CAA, TLSA packets and tests
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r-- | src/journal/journal-file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 912eb94d0a..994d1ec5d8 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -1123,8 +1123,8 @@ static int journal_file_append_data( } #endif - if (compression == 0 && size > 0) - memcpy(o->data.payload, data, size); + if (compression == 0) + memcpy_safe(o->data.payload, data, size); r = journal_file_link_data(f, o, p, hash); if (r < 0) @@ -1389,7 +1389,7 @@ static int journal_file_append_entry_internal( return r; o->entry.seqnum = htole64(journal_file_entry_seqnum(f, seqnum)); - memcpy(o->entry.items, items, n_items * sizeof(EntryItem)); + memcpy_safe(o->entry.items, items, n_items * sizeof(EntryItem)); o->entry.realtime = htole64(ts->realtime); o->entry.monotonic = htole64(ts->monotonic); o->entry.xor_hash = htole64(xor_hash); |