s3:lib:popt: Use memset_s() to burn password string
authorAndreas Schneider <asn@samba.org>
Wed, 10 Oct 2018 14:09:32 +0000 (16:09 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 16 Oct 2018 09:38:40 +0000 (11:38 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Oct 16 11:38:40 CEST 2018 on sn-devel-144

source3/lib/popt_common_cmdline.c

index fe23f84c5477191e3a5cbc331be36ad91a97da5a..971234257e674b589f21c9f0e57ae072c50c90f1 100644 (file)
@@ -217,7 +217,7 @@ void popt_burn_cmdline_password(int argc, char *argv[])
 
                        p = strchr_m(p, '%');
                        if (p != NULL) {
-                               memset(p, '\0', strlen(p));
+                               memset_s(p, strlen(p), '\0', strlen(p));
                        }
                        found = false;
                }