summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraaron <aaron@openbsd.org>2002-08-09 02:23:48 +0000
committeraaron <aaron@openbsd.org>2002-08-09 02:23:48 +0000
commit1f601c7786ce7f5148147c52f6422faac29f119c (patch)
tree950b473a5d7175de329bcf4635e7d4312b4ecfb1
parentavoid dynamically-generated string to printf. die if fd_set overruns. (diff)
downloadwireguard-openbsd-1f601c7786ce7f5148147c52f6422faac29f119c.tar.xz
wireguard-openbsd-1f601c7786ce7f5148147c52f6422faac29f119c.zip
Correct the size arg to memset() so argv will be cleared correctly; art@ ok.
-rw-r--r--usr.bin/pmdb/clit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/pmdb/clit.c b/usr.bin/pmdb/clit.c
index d73e571cea6..10cce14ed65 100644
--- a/usr.bin/pmdb/clit.c
+++ b/usr.bin/pmdb/clit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clit.c,v 1.3 2002/07/12 00:24:53 deraadt Exp $ */
+/* $OpenBSD: clit.c,v 1.4 2002/08/09 02:23:48 aaron Exp $ */
/*
* Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
* All rights reserved.
@@ -207,7 +207,7 @@ cmdloop(void *arg)
HistEvent ev;
#endif
- memset(argv, 0, sizeof(argv));
+ memset(argv, 0, sizeof(char *) * maxargs);
#ifdef __NetBSD__
history(hist, &ev, H_ENTER, elline);