blob: e9146b9085a0867d2a928a6578d5db7d75e60f9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--- orig/libgcrypt-1.4.3/cipher/md.c 2008-09-12 15:43:52.000000000 +0200
+++ libgcrypt-1.4.3/cipher/md.c 2008-11-05 19:52:32.000000000 +0100
@@ -834,7 +834,7 @@ prepare_macpads( gcry_md_hd_t hd, const
if ( !algo )
return GPG_ERR_DIGEST_ALGO; /* i.e. no algo enabled */
- if ( keylen > 64 )
+ if ( keylen > hd->ctx->macpads_Bsize )
{
helpkey = gcry_malloc_secure ( md_digest_length( algo ) );
if ( !helpkey )
@@ -842,7 +842,7 @@ prepare_macpads( gcry_md_hd_t hd, const
gcry_md_hash_buffer ( algo, helpkey, key, keylen );
key = helpkey;
keylen = md_digest_length( algo );
- gcry_assert ( keylen <= 64 );
+ gcry_assert ( keylen <= hd->ctx->macpads_Bsize );
}
memset ( hd->ctx->macpads, 0, 2*(hd->ctx->macpads_Bsize) );
|