mirror of
https://github.com/samba-team/samba.git
synced 2025-09-06 17:44:20 +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:
committed by
Gerald (Jerry) Carter
parent
07fd3bd512
commit
11e160c3d7
@@ -32,11 +32,11 @@
|
|||||||
_PUBLIC_ void hmac_md5_init_rfc2104(const uint8_t *key, int key_len, HMACMD5Context *ctx)
|
_PUBLIC_ void hmac_md5_init_rfc2104(const uint8_t *key, int key_len, HMACMD5Context *ctx)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
uint8_t tk[16];
|
||||||
|
|
||||||
/* if key is longer than 64 bytes reset it to key=MD5(key) */
|
/* if key is longer than 64 bytes reset it to key=MD5(key) */
|
||||||
if (key_len > 64)
|
if (key_len > 64)
|
||||||
{
|
{
|
||||||
uint8_t tk[16];
|
|
||||||
struct MD5Context tctx;
|
struct MD5Context tctx;
|
||||||
|
|
||||||
MD5Init(&tctx);
|
MD5Init(&tctx);
|
||||||
|
Reference in New Issue
Block a user