aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Fumerola <billf@FreeBSD.org>1999-01-02 04:37:46 +0000
committerBill Fumerola <billf@FreeBSD.org>1999-01-02 04:37:46 +0000
commit5d1711220c6dc7e66798664f9766ce64e62a7f5c (patch)
tree0154d35aa8dea633c14f8c51928617be7cb5361b
parenta777e8201974d6c03102a4879275459941eb5932 (diff)
Notes
-rw-r--r--usr.sbin/pw/pw_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index d10c5283f5f8..fd5f4f090686 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/pw/pw_user.c
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id$";
+ "$Id: pw_user.c,v 1.23 1997/10/10 06:23:39 charnier Exp $";
#endif /* not lint */
#include <ctype.h>
@@ -925,7 +925,7 @@ pw_password(struct userconf * cnf, struct cargs * args, char const * user)
l = (random() % 8 + 8); /* 8 - 16 chars */
pw_getrand(rndbuf, l);
for (i = 0; i < l; i++)
- pwbuf[i] = chars[rndbuf[i] % sizeof(chars)];
+ pwbuf[i] = chars[rndbuf[i] % (sizeof(chars)-1)];
pwbuf[i] = '\0';
/*