diff options
author | Shumin Qiu <shumin.qiu@intel.com> | 2014-01-09 00:30:27 +0000 |
---|---|---|
committer | shenshushi <shenshushi@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-01-09 00:30:27 +0000 |
commit | 03bc7c2b09c6f36930a5138c7727c0c4048539a7 (patch) | |
tree | 716a5992955a016ebbe836b7f0d5473af31be91d /ShellPkg/Application/Shell/FileHandleWrappers.c | |
parent | 0b716fd7649f13ca6c214aa47f39ab00212c7d6e (diff) | |
download | edk2-platforms-03bc7c2b09c6f36930a5138c7727c0c4048539a7.tar.xz |
Add code to check whether the pointer 'NewBuffer' in 'FileHandelWrappers.c' and the pointer 'FoundVarName' in 'Dmpstore.c' are NULL before used.
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15060 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application/Shell/FileHandleWrappers.c')
-rw-r--r-- | ShellPkg/Application/Shell/FileHandleWrappers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ShellPkg/Application/Shell/FileHandleWrappers.c b/ShellPkg/Application/Shell/FileHandleWrappers.c index ef8293c1de..c67ddfc269 100644 --- a/ShellPkg/Application/Shell/FileHandleWrappers.c +++ b/ShellPkg/Application/Shell/FileHandleWrappers.c @@ -2,7 +2,7 @@ EFI_FILE_PROTOCOL wrappers for other items (Like Environment Variables,
StdIn, StdOut, StdErr, etc...).
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2013, Hewlett-Packard Development Company, L.P.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -973,7 +973,7 @@ FileInterfaceEnvClose( Status = SHELL_GET_ENVIRONMENT_VARIABLE(((EFI_FILE_PROTOCOL_ENVIRONMENT*)This)->Name, &NewSize, NewBuffer);
}
- if (!EFI_ERROR(Status)) {
+ if (!EFI_ERROR(Status) && NewBuffer != NULL) {
if (StrSize(NewBuffer) > 6)
{
|