diff options
Diffstat (limited to 'src/journal/fsprg.c')
-rw-r--r-- | src/journal/fsprg.c | 4 |
1 files changed, 2 insertions, 2 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); |