r14425: fixed an hmac-md5 error for keys longer than 64 (using deallocated
authorAndrew Tridgell <tridge@samba.org>
Wed, 15 Mar 2006 05:34:04 +0000 (05:34 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:57:22 +0000 (13:57 -0500)
stack variable)

source/lib/crypto/hmacmd5.c

index 7635bf6a829e97d84f03976d9340eea5bad59c74..149a4b861c194a3bc561b12b7aa5149b491ef769 100644 (file)
 _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);