diff options
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.c b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.c index 80de38c..9838fa8 100644 --- a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.c +++ b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.c @@ -64,6 +64,10 @@ LegacyRegion2Decode ( IN BOOLEAN *On
)
{
+ if ((Start < 0xC0000) || ((Start + Length - 1) > 0xFFFFF)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
ASSERT (Granularity != NULL);
*Granularity = 0;
return EFI_SUCCESS;
@@ -98,6 +102,10 @@ LegacyRegion2Lock ( OUT UINT32 *Granularity
)
{
+ if ((Start < 0xC0000) || ((Start + Length - 1) > 0xFFFFF)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
ASSERT (Granularity != NULL);
*Granularity = 0;
return EFI_SUCCESS;
@@ -137,6 +145,10 @@ LegacyRegion2BootLock ( OUT UINT32 *Granularity
)
{
+ if ((Start < 0xC0000) || ((Start + Length - 1) > 0xFFFFF)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
ASSERT (Granularity != NULL);
*Granularity = 0;
return EFI_SUCCESS;
@@ -171,6 +183,10 @@ LegacyRegion2Unlock ( OUT UINT32 *Granularity
)
{
+ if ((Start < 0xC0000) || ((Start + Length - 1) > 0xFFFFF)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
ASSERT (Granularity != NULL);
*Granularity = 0;
return EFI_SUCCESS;
|