diff options
| author | Joerg Wunsch <joerg@FreeBSD.org> | 2001-08-21 10:29:01 +0000 |
|---|---|---|
| committer | Joerg Wunsch <joerg@FreeBSD.org> | 2001-08-21 10:29:01 +0000 |
| commit | 81724f617380223f12894ff980344b8d46da4daa (patch) | |
| tree | 94a74abf3aa653380d194c1c2f6916b8fb4921c8 /pw/pw_user.c | |
| parent | d7463a76c3906be230e29406027fcbc5a22e82da (diff) | |
| download | pw-darwin-81724f617380223f12894ff980344b8d46da4daa.tar.gz pw-darwin-81724f617380223f12894ff980344b8d46da4daa.zip | |
Fix a typo in a variable name that made pw(8) coredump when using
USE_MD5RAND.
MFC after: 2 days
Diffstat (limited to 'pw/pw_user.c')
| -rw-r--r-- | pw/pw_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c index 8a09668..9d00bfa 100644 --- a/pw/pw_user.c +++ b/pw/pw_user.c @@ -1046,7 +1046,7 @@ pw_getrand(u_char *buf, int len) /* cryptographically secure rng */ MD5Update (&md5_ctx, (u_char*)&tv, sizeof tv); } while (n++<20 || tv.tv_usec-tvo.tv_usec<100*1000); MD5Final (ubuf, &md5_ctx); - memcpy(buf+i, ubuf, MIN(16, len-n)); + memcpy(buf+i, ubuf, MIN(16, len-i)); } return buf; } |
