summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-10 09:35:43 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-10 09:35:43 +0000
commit44890dbde6b2a70348787d81885012583ed4a5dd (patch)
tree308b8274f46bc560739978f310f2953996581d09 /ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
parent826120239506ccaf7a8603560b79cf341f2d3bd5 (diff)
downloadedk2-platforms-44890dbde6b2a70348787d81885012583ed4a5dd.tar.xz
Refine code to make it more safely.
Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13712 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
index c85091d0a4..8aafcced24 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
@@ -59,7 +59,7 @@ GetAttrType (
RetString = StrnCatGrow(&RetString, &BufLen, L"Invalid", 0);
}
- if (RetString[0] == L'+') {
+ if ((RetString != NULL) && (RetString[0] == L'+')) {
CopyMem(RetString, RetString + 1, StrSize(RetString + 1));
}