summaryrefslogtreecommitdiff
path: root/init_dir.go
diff options
context:
space:
mode:
Diffstat (limited to 'init_dir.go')
-rw-r--r--init_dir.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/init_dir.go b/init_dir.go
index b13f741..ea902ec 100644
--- a/init_dir.go
+++ b/init_dir.go
@@ -45,8 +45,9 @@ func initDir(args *argContainer) {
tlog.Fatal.Println(err)
os.Exit(exitcodes.WriteConf)
}
- // Note: cannot overwrite password because in Go, strings are
- // read-only byte slices.
+ for i := range password {
+ password[i] = 0
+ }
// password runs out of scope here
}
// Forward mode with filename encryption enabled needs a gocryptfs.diriv