Fix use of memset(3)
authorDavid Zeuthen <davidz@redhat.com>
Sat, 21 Jan 2012 21:45:50 +0000 (16:45 -0500)
committerDavid Zeuthen <davidz@redhat.com>
Sat, 21 Jan 2012 21:45:50 +0000 (16:45 -0500)
Pointed out here https://bugs.freedesktop.org/show_bug.cgi?id=45039

Signed-off-by: David Zeuthen <davidz@redhat.com>
tools/udisksctl.c

index d3b9a54..26ecc46 100644 (file)
@@ -1322,7 +1322,7 @@ handle_command_unlock_lock (gint        *argc,
  out:
   if (passphrase != NULL)
     {
-      memset (passphrase, strlen (passphrase), '\0');
+      memset (passphrase, '\0', strlen (passphrase));
       g_free (passphrase);
     }
   if (options != NULL)