diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sha3-224.c | 2 | ||||
-rw-r--r-- | sha3-256.c | 2 | ||||
-rw-r--r-- | sha3-384.c | 2 | ||||
-rw-r--r-- | sha3-512.c | 2 |
5 files changed, 10 insertions, 4 deletions
@@ -1,5 +1,11 @@ 2014-04-16 Niels Möller <nisse@lysator.liu.se> + * sha3-224.c (sha3_224_init): Pass pointer to context struct, not + pointer to first element, to memset. + * sha3-256.c (sha3_256_init): Likewise. + * sha3-384.c (sha3_384_init): Likewise. + * sha3-512.c (sha3_512_init): Likewise. + * examples/eratosthenes.c (vector_alloc): Use sizeof(*vector) instead of explicit type in malloc call. (vector_init): Make constant explicitly unsigned long. @@ -45,7 +45,7 @@ void sha3_224_init (struct sha3_224_ctx *ctx) { - memset (&ctx->state, 0, offsetof (struct sha3_224_ctx, block)); + memset (ctx, 0, offsetof (struct sha3_224_ctx, block)); } void @@ -45,7 +45,7 @@ void sha3_256_init (struct sha3_256_ctx *ctx) { - memset (&ctx->state, 0, offsetof (struct sha3_256_ctx, block)); + memset (ctx, 0, offsetof (struct sha3_256_ctx, block)); } void @@ -45,7 +45,7 @@ void sha3_384_init (struct sha3_384_ctx *ctx) { - memset (&ctx->state, 0, offsetof (struct sha3_384_ctx, block)); + memset (ctx, 0, offsetof (struct sha3_384_ctx, block)); } void @@ -45,7 +45,7 @@ void sha3_512_init (struct sha3_512_ctx *ctx) { - memset (&ctx->state, 0, offsetof (struct sha3_512_ctx, block)); + memset (ctx, 0, offsetof (struct sha3_512_ctx, block)); } void |