diff options
author | joerg <joerg@FreeBSD.org> | 2001-08-21 10:29:01 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 2001-08-21 10:29:01 +0000 |
commit | 637fbcbedbfa2fb5dd068cdf304bef2b5ab2bf33 (patch) | |
tree | 4c8297362b54870d1f39e845c3e59cdd92617cce /usr.sbin | |
parent | 2e08e5b45a70fbd36fa2671f91eb2a3208299141 (diff) | |
download | FreeBSD-src-637fbcbedbfa2fb5dd068cdf304bef2b5ab2bf33.zip FreeBSD-src-637fbcbedbfa2fb5dd068cdf304bef2b5ab2bf33.tar.gz |
Fix a typo in a variable name that made pw(8) coredump when using
USE_MD5RAND.
MFC after: 2 days
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pw/pw_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 8a09668..9d00bfa 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/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; } |