Fix an old off-by-one error causing well known 'wrong bucket' panic.

Submitted by:	Conrad Minshall <conrad@mac.com>
MFC after:	1 week
This commit is contained in:
bp 2001-08-21 08:07:18 +00:00
parent e88aef4f59
commit e6dae07b54

View File

@ -120,7 +120,7 @@ smb_ntencrypt(const u_char *apwd, u_char *C8, u_char *RN)
int len;
len = strlen(apwd);
unipwd = malloc(len * sizeof(u_int16_t), M_SMBTEMP, M_WAITOK);
unipwd = malloc((len + 1) * sizeof(u_int16_t), M_SMBTEMP, M_WAITOK);
/*
* S21 = concat(MD4(U(apwd)), zeros(5));
*/