summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-29 06:38:55 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-29 06:38:55 +0000
commit0e9b25c23b2f8f0997eba6c38ccc82f92cd26fcc (patch)
treec7a95eb9cb7023de3c2757e46c15fce3e54e24b4 /IntelFrameworkModulePkg/Universal
parent16adc276929ebabefa40d62eebd2f12ecd5c3296 (diff)
downloadedk2-platforms-0e9b25c23b2f8f0997eba6c38ccc82f92cd26fcc.tar.xz
Add pointer check for NULL before dereference it.
Signed-off-by: ydong10 Reviewed-by: vanjeff git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12474 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
index 6e6c7266d0..c055537e37 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
@@ -673,6 +673,7 @@ Var_UpdateDriverOption (
&gEfiGlobalVariableGuid,
&DriverOrderListSize
);
+ ASSERT (DriverOrderList != NULL);
NewDriverOrderList = AllocateZeroPool (DriverOrderListSize + sizeof (UINT16));
ASSERT (NewDriverOrderList != NULL);
CopyMem (NewDriverOrderList, DriverOrderList, DriverOrderListSize);
@@ -842,7 +843,7 @@ Var_UpdateBootOption (
&gEfiGlobalVariableGuid,
&BootOrderListSize
);
-
+ ASSERT (BootOrderList != NULL);
NewBootOrderList = AllocateZeroPool (BootOrderListSize + sizeof (UINT16));
ASSERT (NewBootOrderList != NULL);
CopyMem (NewBootOrderList, BootOrderList, BootOrderListSize);