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 | a7ad3937e5ac46dd20036eb87518c32bad76e953 (patch) | |
tree | b4baa0d4567cb52a79fe708e57ec1e340677b443 /pw | |
parent | 6960cf009310003dfc79d5a3f9bf9d3db2105a7f (diff) | |
download | pw-darwin-a7ad3937e5ac46dd20036eb87518c32bad76e953.tar.gz pw-darwin-a7ad3937e5ac46dd20036eb87518c32bad76e953.tar.zst pw-darwin-a7ad3937e5ac46dd20036eb87518c32bad76e953.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')
-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; } |