]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
nettle-benchmark: Fixed memset calls (amending 2014-02-06 change).
authorNiels Möller <nisse@lysator.liu.se>
Sat, 23 Aug 2014 19:54:14 +0000 (21:54 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 23 Aug 2014 19:54:14 +0000 (21:54 +0200)
ChangeLog
examples/nettle-benchmark.c

index 81d36860ed70b37c38ea24e072b338419221fd32..ccbae50fd45371fa7a002aa8dd57663b14907dc0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-23  Niels Möller  <nisse@lysator.liu.se>
+
+       * examples/nettle-benchmark.c (time_cipher): Fixed memset calls,
+       amending the totally broken change from 2014-02-06.
+
 2014-07-02  Niels Möller  <nisse@lysator.liu.se>
 
        * eccdata.c (ecc_dup): Use mpz_submul_ui, now available in
index 847b80c11dc5c3ac1ee352fca14ab720374f16a1..d60aad76f25a87f484a2db3d7e13cfcc96c92efa 100644 (file)
@@ -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);