diff options
| author | Steve Langasek <steve.langasek@canonical.com> | 2014-10-06 17:17:33 -0700 |
|---|---|---|
| committer | Steve Langasek <steve.langasek@canonical.com> | 2014-10-06 17:17:33 -0700 |
| commit | 59945b252e76a601fc6bbf43fb49f8a8f0d0c9a9 (patch) | |
| tree | 70e8a684bf6b3480abf1504e7befb1f8f955d962 /Cryptlib/Cipher/CryptArc4.c | |
| parent | 5fc0e7f624b64f40d5d4694e35f8c967a7317902 (diff) | |
| parent | 72bb39c0237f8bcc3afa8b623e8b097eec6d69cd (diff) | |
| download | efi-boot-shim-59945b252e76a601fc6bbf43fb49f8a8f0d0c9a9.tar.gz efi-boot-shim-59945b252e76a601fc6bbf43fb49f8a8f0d0c9a9.zip | |
Merge upstream version 0.7
Diffstat (limited to 'Cryptlib/Cipher/CryptArc4.c')
| -rw-r--r-- | Cryptlib/Cipher/CryptArc4.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Cryptlib/Cipher/CryptArc4.c b/Cryptlib/Cipher/CryptArc4.c index 69214181..f3c4d31a 100644 --- a/Cryptlib/Cipher/CryptArc4.c +++ b/Cryptlib/Cipher/CryptArc4.c @@ -32,14 +32,14 @@ Arc4GetContextSize ( // for backup copy. When Arc4Reset() is called, we can use the backup copy to restore
// the working copy to the initial state.
//
- return (UINTN) (2 * sizeof(RC4_KEY));
+ return (UINTN) (2 * sizeof (RC4_KEY));
}
/**
Initializes user-supplied memory as ARC4 context for subsequent use.
This function initializes user-supplied memory pointed by Arc4Context as ARC4 context.
- In addtion, it sets up all ARC4 key materials for subsequent encryption and decryption
+ In addition, it sets up all ARC4 key materials for subsequent encryption and decryption
operations.
If Arc4Context is NULL, then return FALSE.
@@ -75,7 +75,7 @@ Arc4Init ( RC4_set_key (Rc4Key, (UINT32) KeySize, Key);
- CopyMem (Rc4Key + 1, Rc4Key, sizeof(RC4_KEY));
+ CopyMem (Rc4Key + 1, Rc4Key, sizeof (RC4_KEY));
return TRUE;
}
@@ -115,7 +115,7 @@ Arc4Encrypt ( //
// Check input parameters.
//
- if (Arc4Context == NULL || Input == NULL || Output == NULL) {
+ if (Arc4Context == NULL || Input == NULL || Output == NULL || InputSize > INT_MAX) {
return FALSE;
}
@@ -161,7 +161,7 @@ Arc4Decrypt ( //
// Check input parameters.
//
- if (Arc4Context == NULL || Input == NULL || Output == NULL) {
+ if (Arc4Context == NULL || Input == NULL || Output == NULL || InputSize > INT_MAX) {
return FALSE;
}
@@ -205,7 +205,7 @@ Arc4Reset ( Rc4Key = (RC4_KEY *) Arc4Context;
- CopyMem (Rc4Key, Rc4Key + 1, sizeof(RC4_KEY));
+ CopyMem (Rc4Key, Rc4Key + 1, sizeof (RC4_KEY));
return TRUE;
}
|
