]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Fix memset calls
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 21 Jun 2013 12:39:12 +0000 (14:39 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 21 Jun 2013 12:39:33 +0000 (14:39 +0200)
client.c
keys.c

index 8280d8f0b46c393d610216fa48b6f97c26aeecc4..5fe14a7da4f4dc41d6206b96d1882a2008853fff 100644 (file)
--- a/client.c
+++ b/client.c
@@ -2808,7 +2808,7 @@ authenticate_from_config(const char *filename)
   }
 
   /* Erase password from stack */
-  memset(line, sizeof (line), 0);
+  memset(line, 0, sizeof (line));
 
   return ret;
 }
diff --git a/keys.c b/keys.c
index 84194c75f7463343211432e87f21565999b47b02..a78d072a77138eab6a9644b5d594aa00a3b94901 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -109,7 +109,7 @@ generate_key(unsigned long key_id)
   fclose(f);
 
   /* Erase the key from stack */
-  memset(key, sizeof (key), 0);
+  memset(key, 0, sizeof (key));
 
   LOG(LOGS_INFO, LOGF_Keys, "Generated key %lu", key_id);