diff options
author | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-14 05:19:25 +0000 |
---|---|---|
committer | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-14 05:19:25 +0000 |
commit | 3b4151bcb43ec74e0a350c7b93f75531cc8df003 (patch) | |
tree | 35d658d041e3f5b3929bb75229eb55cc3068be96 /SecurityPkg/VariableAuthenticated/EsalVariableDxeSal | |
parent | cf6a8f1453bed5aca0ac32b4038c83ce62b77327 (diff) | |
download | edk2-platforms-3b4151bcb43ec74e0a350c7b93f75531cc8df003.tar.xz |
Add pointer check for NULL before dereference it.
Signed-off-by: sfu5
Reviewed-by: tye
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12537 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/EsalVariableDxeSal')
-rw-r--r-- | SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/Variable.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/Variable.c b/SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/Variable.c index d6c6686351..2be925d236 100644 --- a/SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/Variable.c +++ b/SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/Variable.c @@ -846,6 +846,7 @@ UpdateVariableCache ( // If size of data changes, allocate pool and copy data.
//
Entry->Data = AllocatePool (DataSize);
+ ASSERT (Entry->Data != NULL);
Entry->DataSize = DataSize;
CopyMem (Entry->Data, Data, DataSize);
}
|