summaryrefslogtreecommitdiff
path: root/CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4.c
diff options
context:
space:
mode:
Diffstat (limited to 'CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4.c')
-rw-r--r--CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4.c b/CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4.c
index 0e5331c20d..f3c4d31a2d 100644
--- a/CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4.c
+++ b/CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4.c
@@ -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;
}