diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-02-25 15:09:39 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-02-26 16:47:07 +0800 |
commit | 48c18bd1663d1a5c84459fe98cd742cc9cbb9562 (patch) | |
tree | 57b0ebf0b0d89e41f0e263bf176bc031562c2c34 /MdeModulePkg | |
parent | 4cb6375ca6ddf73577758a72b1464896c3eae767 (diff) | |
download | edk2-platforms-48c18bd1663d1a5c84459fe98cd742cc9cbb9562.tar.xz |
MdeModulePkg: Add ASSERT to make sure pointer 'OptionalData' not be NULL
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c index 929f38343b..2ecf5b6605 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c @@ -614,6 +614,7 @@ Var_UpdateDriverOption ( if (OptionalDataExist) {
NewLoadContext->OptionalData = AllocateZeroPool (LoadOption.OptionalDataSize);
+ ASSERT (NewLoadContext->OptionalData != NULL);
CopyMem (
NewLoadContext->OptionalData,
LoadOption.OptionalData,
@@ -725,6 +726,7 @@ Var_UpdateBootOption ( if (OptionalDataExist) {
NewLoadContext->OptionalData = AllocateZeroPool (LoadOption.OptionalDataSize);
+ ASSERT (NewLoadContext->OptionalData != NULL);
CopyMem (
NewLoadContext->OptionalData,
LoadOption.OptionalData,
|