1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r14425: fixed an hmac-md5 error for keys longer than 64 (using deallocated

stack variable)
(This used to be commit b10cb752c2)
This commit is contained in:
Andrew Tridgell 2006-03-15 05:34:04 +00:00 committed by Gerald (Jerry) Carter
parent 07fd3bd512
commit 11e160c3d7

View File

@ -32,11 +32,11 @@
_PUBLIC_ void hmac_md5_init_rfc2104(const uint8_t *key, int key_len, HMACMD5Context *ctx)
{
int i;
uint8_t tk[16];
/* if key is longer than 64 bytes reset it to key=MD5(key) */
if (key_len > 64)
{
uint8_t tk[16];
struct MD5Context tctx;
MD5Init(&tctx);