diff options
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/fsprg.c | 4 | ||||
-rw-r--r-- | src/journal/journal-file.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/journal/fsprg.c b/src/journal/fsprg.c index dd9a242561..5c8d6d6feb 100644 --- a/src/journal/fsprg.c +++ b/src/journal/fsprg.c @@ -51,7 +51,7 @@ static void mpi_export(void *buf, size_t buflen, const gcry_mpi_t x) { assert(gcry_mpi_cmp_ui(x, 0) >= 0); len = (gcry_mpi_get_nbits(x) + 7) / 8; assert(len <= buflen); - memset(buf, 0, buflen); + memzero(buf, buflen); gcry_mpi_print(GCRYMPI_FMT_USG, buf + (buflen - len), len, &nwritten, x); assert(nwritten == len); } @@ -306,7 +306,7 @@ void FSPRG_GenState0(void *state, const void *mpk, const void *seed, size_t seed memcpy(state, mpk, 2 + secpar / 8); mpi_export(state + 2 + 1 * secpar / 8, secpar / 8, x); - memset(state + 2 + 2 * secpar / 8, 0, 8); + memzero(state + 2 + 2 * secpar / 8, 8); gcry_mpi_release(n); gcry_mpi_release(x); diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index b3747e37e4..3a081110b9 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -560,7 +560,7 @@ static int journal_file_setup_data_hash_table(JournalFile *f) { if (r < 0) return r; - memset(o->hash_table.items, 0, s); + memzero(o->hash_table.items, s); f->header->data_hash_table_offset = htole64(p + offsetof(Object, hash_table.items)); f->header->data_hash_table_size = htole64(s); @@ -586,7 +586,7 @@ static int journal_file_setup_field_hash_table(JournalFile *f) { if (r < 0) return r; - memset(o->hash_table.items, 0, s); + memzero(o->hash_table.items, s); f->header->field_hash_table_offset = htole64(p + offsetof(Object, hash_table.items)); f->header->field_hash_table_size = htole64(s); |