mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
16adc27692
commit
0e9b25c23b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue