]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
nettle-benchmark: Fixed memset calls.
authorNiels Möller <nisse@lysator.liu.se>
Thu, 6 Feb 2014 12:40:43 +0000 (13:40 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Thu, 6 Feb 2014 12:40:43 +0000 (13:40 +0100)
ChangeLog
examples/nettle-benchmark.c

index f5e440f4548bdb45c737fc5bf2b186bfe305261d..9632977bb8a9834fe07a0b1298954de389220c85 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-02-06  Niels Möller  <nisse@lysator.liu.se>
+
+       * examples/nettle-benchmark.c (time_cipher): Fixed memset calls.
+
 2014-01-30  Niels Möller  <nisse@lysator.liu.se>
 
        * Makefile.in (nettle_SOURCES): Arrange in alphabetic order.
index 7e15a18e76ead2b3748a6a19c88559f29a799280..d66ce71ec1a34e8c99908822c902fb29971a4590 100644 (file)
@@ -553,7 +553,7 @@ time_cipher(const struct nettle_cipher *cipher)
        info.block_size = cipher->block_size;
        info.iv = iv;
     
-        memset(iv, 0, sizeof(iv));
+        memset(iv, 0, sizeof(cipher->block_size));
     
         cipher->set_encrypt_key(ctx, key);
 
@@ -569,7 +569,7 @@ time_cipher(const struct nettle_cipher *cipher)
        info.block_size = cipher->block_size;
        info.iv = iv;
     
-        memset(iv, 0, sizeof(iv));
+        memset(iv, 0, sizeof(cipher->block_size));
 
         cipher->set_decrypt_key(ctx, key);
 
@@ -586,7 +586,7 @@ time_cipher(const struct nettle_cipher *cipher)
        info.block_size = cipher->block_size;
        info.iv = iv;
     
-        memset(iv, 0, sizeof(iv));
+        memset(iv, 0, sizeof(cipher->block_size));
     
         cipher->set_encrypt_key(ctx, key);