summaryrefslogtreecommitdiff
path: root/Cryptlib/Hmac
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@canonical.com>2014-10-06 15:39:48 -0700
committerSteve Langasek <steve.langasek@canonical.com>2014-10-06 15:39:48 -0700
commit72bb39c0237f8bcc3afa8b623e8b097eec6d69cd (patch)
treeab49a0f8e82cdee502fd556ad7ccca3242f40f05 /Cryptlib/Hmac
parentbfab8d6791bccc38a8604cbc933048319c920780 (diff)
downloadefi-boot-shim-72bb39c0237f8bcc3afa8b623e8b097eec6d69cd.tar.gz
efi-boot-shim-72bb39c0237f8bcc3afa8b623e8b097eec6d69cd.zip
Import upstream version 0.7
Diffstat (limited to 'Cryptlib/Hmac')
-rw-r--r--Cryptlib/Hmac/CryptHmacMd5.c4
-rw-r--r--Cryptlib/Hmac/CryptHmacSha1.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/Cryptlib/Hmac/CryptHmacMd5.c b/Cryptlib/Hmac/CryptHmacMd5.c
index 0cdab7ac..693cd322 100644
--- a/Cryptlib/Hmac/CryptHmacMd5.c
+++ b/Cryptlib/Hmac/CryptHmacMd5.c
@@ -30,7 +30,7 @@ HmacMd5GetContextSize (
//
// Retrieves the OpenSSL HMAC-MD5 Context Size
//
- return (UINTN)(sizeof (HMAC_CTX));
+ return (UINTN) (sizeof (HMAC_CTX));
}
/**
@@ -58,7 +58,7 @@ HmacMd5Init (
//
// Check input parameters.
//
- if (HmacMd5Context == NULL) {
+ if (HmacMd5Context == NULL || KeySize > INT_MAX) {
return FALSE;
}
diff --git a/Cryptlib/Hmac/CryptHmacSha1.c b/Cryptlib/Hmac/CryptHmacSha1.c
index 58da2f3a..881d26cf 100644
--- a/Cryptlib/Hmac/CryptHmacSha1.c
+++ b/Cryptlib/Hmac/CryptHmacSha1.c
@@ -30,7 +30,7 @@ HmacSha1GetContextSize (
//
// Retrieves the OpenSSL HMAC-SHA1 Context Size
//
- return (UINTN)(sizeof (HMAC_CTX));
+ return (UINTN) (sizeof (HMAC_CTX));
}
/**
@@ -58,7 +58,7 @@ HmacSha1Init (
//
// Check input parameters.
//
- if (HmacSha1Context == NULL) {
+ if (HmacSha1Context == NULL || KeySize > INT_MAX) {
return FALSE;
}