diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-11-17 14:30:47 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-11-17 14:30:47 +0000 |
commit | 6a179dcaee63eec3fba37ffd6459459190a57aaf (patch) | |
tree | f1789dff6fb1c5fd57021faedf1d5d9dfafce101 /EdkCompatibilityPkg | |
parent | d9304888c55b66c30fcd831af008dee94fe9b4a3 (diff) | |
download | edk2-platforms-6a179dcaee63eec3fba37ffd6459459190a57aaf.tar.xz |
Add in parameter checking to pass UEFI HII SCT test.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6567 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r-- | EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c index edbc34a3e4..738020aafe 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c @@ -403,11 +403,20 @@ ThunkExtractConfig ( VOID *Data;
UINTN DataSize;
+ if (Request == NULL) {
+ return EFI_NOT_FOUND;
+ }
+
Data = NULL;
ConfigAccess = CONFIG_ACCESS_PRIVATE_FROM_PROTOCOL (This);
BufferStorage = GetStorageFromConfigString (ConfigAccess->ThunkContext->FormSet, Request);
+ if (BufferStorage == NULL) {
+ *Progress = (EFI_STRING) Request;
+ return EFI_NOT_FOUND;
+ }
+
if (ConfigAccess->ThunkContext->NvMapOverride == NULL) {
//
// NvMapOverride is not used. Get the Storage data from EFI Variable or Framework Form Callback.
@@ -491,11 +500,20 @@ ThunkRouteConfig ( BOOLEAN ResetRequired;
BOOLEAN DataAllocated;
+ if (Configuration == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
Data = NULL;
ConfigAccess = CONFIG_ACCESS_PRIVATE_FROM_PROTOCOL (This);
BufferStorage = GetStorageFromConfigString (ConfigAccess->ThunkContext->FormSet, Configuration);
+ if (BufferStorage == NULL) {
+ *Progress = Configuration;
+ return EFI_NOT_FOUND;
+ }
+
DataSize2 = BufferStorage->Size;
if (ConfigAccess->ThunkContext->NvMapOverride == NULL) {
DataAllocated = TRUE;
|