diff options
Diffstat (limited to 'CryptoPkg/Library/BaseCryptLib/Pem')
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c b/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c index bc5c93ff98..ed53b2dcbf 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c +++ b/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c @@ -85,6 +85,10 @@ RsaGetPrivateKeyFromPem ( ASSERT (PemData != NULL);
ASSERT (RsaContext != NULL);
+ if (PemSize > INT_MAX) {
+ return FALSE;
+ }
+
Status = FALSE;
PemBio = NULL;
|