diff options
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; } |