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
This commit is contained in:
ydong10 2012-09-10 09:35:43 +00:00
parent 8261202395
commit 44890dbde6
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}