Fixed issue with string length in passwordEncrypt

This commit is contained in:
Mark Riddoch 2013-07-25 10:23:34 +02:00
parent 8df4014faa
commit 230cab7024

View File

@ -231,7 +231,7 @@ unsigned char encrypted[80];
AES_cbc_encrypt(padded_passwd, encrypted, padded_len, &aeskey, maxkeys->initvector, AES_ENCRYPT);
hex_output = (char *)malloc(padded_len * 2);
gw_bin2hex(hex_output, encrypted, padded_len * 2);
gw_bin2hex(hex_output, encrypted, padded_len);
return hex_output;
}