From: Niels Möller Date: Sat, 23 Aug 2014 19:54:14 +0000 (+0200) Subject: nettle-benchmark: Fixed memset calls (amending 2014-02-06 change). X-Git-Tag: nettle_3.1rc1~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0221c33543dcef08cf888ea2f38e9c8b2578c29;p=thirdparty%2Fnettle.git nettle-benchmark: Fixed memset calls (amending 2014-02-06 change). --- diff --git a/ChangeLog b/ChangeLog index 81d36860..ccbae50f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-08-23 Niels Möller + + * examples/nettle-benchmark.c (time_cipher): Fixed memset calls, + amending the totally broken change from 2014-02-06. + 2014-07-02 Niels Möller * eccdata.c (ecc_dup): Use mpz_submul_ui, now available in diff --git a/examples/nettle-benchmark.c b/examples/nettle-benchmark.c index 847b80c1..d60aad76 100644 --- a/examples/nettle-benchmark.c +++ b/examples/nettle-benchmark.c @@ -524,7 +524,7 @@ time_cipher(const struct nettle_cipher *cipher) info.block_size = cipher->block_size; info.iv = iv; - memset(iv, 0, sizeof(cipher->block_size)); + memset(iv, 0, cipher->block_size); cipher->set_encrypt_key(ctx, key); @@ -540,7 +540,7 @@ time_cipher(const struct nettle_cipher *cipher) info.block_size = cipher->block_size; info.iv = iv; - memset(iv, 0, sizeof(cipher->block_size)); + memset(iv, 0, cipher->block_size); cipher->set_decrypt_key(ctx, key); @@ -557,7 +557,7 @@ time_cipher(const struct nettle_cipher *cipher) info.block_size = cipher->block_size; info.iv = iv; - memset(iv, 0, sizeof(cipher->block_size)); + memset(iv, 0, cipher->block_size); cipher->set_encrypt_key(ctx, key);