Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/cgdconfig use explicit_memset(3)
details: https://anonhg.NetBSD.org/src/rev/898d013484a9
branches: trunk
changeset: 318932:898d013484a9
user: alnsn <alnsn%NetBSD.org@localhost>
date: Wed May 09 19:38:46 2018 +0000
description:
use explicit_memset(3)
diffstat:
sbin/cgdconfig/cgdconfig.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 4e1619e6f153 -r 898d013484a9 sbin/cgdconfig/cgdconfig.c
--- a/sbin/cgdconfig/cgdconfig.c Wed May 09 19:38:40 2018 +0000
+++ b/sbin/cgdconfig/cgdconfig.c Wed May 09 19:38:46 2018 +0000
@@ -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 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index