diff options
| author | Matthew Garrett <matthew.garrett@nebula.com> | 2013-10-03 13:19:32 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2013-10-04 11:51:09 -0400 |
| commit | 9107ff9046dc09e8afdb89e86ce588edb3f4a642 (patch) | |
| tree | 23dbc103ff77c4b098c05dd5125a9ddc2c327350 /Cryptlib/Rand/CryptRand.c | |
| parent | 16c55f99e872fe52a22336ccb4f09f35d33b2ffa (diff) | |
| download | efi-boot-shim-9107ff9046dc09e8afdb89e86ce588edb3f4a642.tar.gz efi-boot-shim-9107ff9046dc09e8afdb89e86ce588edb3f4a642.zip | |
Update to current Tiano Cryptlib
Diffstat (limited to 'Cryptlib/Rand/CryptRand.c')
| -rw-r--r-- | Cryptlib/Rand/CryptRand.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Cryptlib/Rand/CryptRand.c b/Cryptlib/Rand/CryptRand.c index a61c0c2a..dc3ab992 100644 --- a/Cryptlib/Rand/CryptRand.c +++ b/Cryptlib/Rand/CryptRand.c @@ -43,6 +43,10 @@ RandomSeed ( IN UINTN SeedSize
)
{
+ if (SeedSize > INT_MAX) {
+ return FALSE;
+ }
+
//
// Seed the pseudorandom number generator with user-supplied value.
// NOTE: A cryptographic PRNG must be seeded with unpredictable data.
@@ -82,7 +86,7 @@ RandomBytes ( //
// Check input parameters.
//
- if (Output == NULL) {
+ if (Output == NULL || Size > INT_MAX) {
return FALSE;
}
|
