Fix a typo in a variable name that made pw(8) coredump when using
USE_MD5RAND. MFC after: 2 days
This commit is contained in:
parent
fe98760edc
commit
19c6903f17
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user