mirror of https://github.com/acidanthera/audk.git
Fixed VfrCompile crash on efivarstore statement.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Aaron Pop <aaronp@ami.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16591 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
92ca0c6721
commit
5c7956a2a3
|
@ -917,10 +917,11 @@ vfrStatementVarStoreEfi :
|
|||
CHAR8 *TypeName;
|
||||
UINT32 LineNum;
|
||||
CHAR8 *StoreName = NULL;
|
||||
BOOLEAN CustomizedName = FALSE;
|
||||
>>
|
||||
E:Efivarstore << VSEObj.SetLineNo(E->getLine()); >>
|
||||
(
|
||||
TN:StringIdentifier "," << TypeName = TN->getText(); LineNum = TN->getLine(); >>
|
||||
TN:StringIdentifier "," << TypeName = TN->getText(); LineNum = TN->getLine(); CustomizedName = TRUE; >>
|
||||
| U8:"UINT8" "," << TypeName = U8->getText(); LineNum = U8->getLine(); >>
|
||||
| U16:"UINT16" "," << TypeName = U16->getText(); LineNum = U16->getLine(); >>
|
||||
| C16:"CHAR16" "," << TypeName = (CHAR8 *) "UINT16"; LineNum = C16->getLine(); >>
|
||||
|
@ -953,6 +954,10 @@ vfrStatementVarStoreEfi :
|
|||
if (StoreName == NULL) {
|
||||
_PCATCH (VFR_RETURN_UNSUPPORTED, VN->getLine(), "Can't get varstore name for this StringId!");
|
||||
}
|
||||
if (!CustomizedName) {
|
||||
_PCATCH (VFR_RETURN_UNSUPPORTED, E->getLine(), "Old style efivarstore must have String Identifier!");
|
||||
return;
|
||||
}
|
||||
Size = _STOU32(N->getText(), N->getLine());
|
||||
switch (Size) {
|
||||
case 1:
|
||||
|
|
Loading…
Reference in New Issue