From 44890dbde6b2a70348787d81885012583ed4a5dd Mon Sep 17 00:00:00 2001 From: ydong10 Date: Mon, 10 Sep 2012 09:35:43 +0000 Subject: Refine code to make it more safely. Signed-off-by: Eric Dong git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13712 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ShellPkg') 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)); } -- cgit v1.2.3