Module Name: src
Committed By: alnsn
Date: Wed May 9 19:38:46 UTC 2018
Modified Files:
src/sbin/cgdconfig: cgdconfig.c
Log Message:
use explicit_memset(3)
To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sbin/cgdconfig/cgdconfig.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/cgdconfig/cgdconfig.c
diff -u src/sbin/cgdconfig/cgdconfig.c:1.47 src/sbin/cgdconfig/cgdconfig.c:1.48
--- src/sbin/cgdconfig/cgdconfig.c:1.47 Wed May 9 18:18:11 2018
+++ src/sbin/cgdconfig/cgdconfig.c Wed May 9 19:38:46 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cgdconfig.c,v 1.47 2018/05/09 18:18:11 alnsn Exp $ */
+/* $NetBSD: cgdconfig.c,v 1.48 2018/05/09 19:38:46 alnsn Exp $ */
/*-
* Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 2002, 2003\
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: cgdconfig.c,v 1.47 2018/05/09 18:18:11 alnsn Exp $");
+__RCSID("$NetBSD: cgdconfig.c,v 1.48 2018/05/09 19:38:46 alnsn Exp $");
#endif
#include <err.h>
@@ -412,7 +412,7 @@ maybe_getpass(char *prompt)
err(EXIT_FAILURE, "failed to read passphrase");
pass = estrdup(p);
- memset(buf, 0, sizeof(buf));
+ explicit_memset(buf, 0, sizeof(buf));
return pass;
}
@@ -448,7 +448,7 @@ getkey_pkcs5_pbkdf2(const char *target,
ret = bits_new(tmp, keylen);
kg->kg_key = bits_dup(ret);
- memset(passp, 0, strlen(passp));
+ explicit_memset(passp, 0, strlen(passp));
free(passp);
free(tmp);
return ret;