/** @file\r
Parser for IFR binary encoding.\r
\r
-Copyright (c) 2008, Intel Corporation\r
+Copyright (c) 2008 - 2010, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
FORMSET_STORAGE *Storage;\r
\r
Storage = AllocateZeroPool (sizeof (FORMSET_STORAGE));\r
+ ASSERT (Storage != NULL);\r
Storage->Signature = FORMSET_STORAGE_SIGNATURE;\r
InsertTailList (&FormSet->StorageListHead, &Storage->Link);\r
\r
// Create a new Form for this FormSet\r
//\r
CurrentForm = AllocateZeroPool (sizeof (FORM_BROWSER_FORM));\r
+ ASSERT (CurrentForm != NULL);\r
CurrentForm->Signature = FORM_BROWSER_FORM_SIGNATURE;\r
\r
InitializeListHead (&CurrentForm->StatementListHead);\r
//\r
case EFI_IFR_DEFAULTSTORE_OP:\r
DefaultStore = AllocateZeroPool (sizeof (FORMSET_DEFAULTSTORE));\r
+ ASSERT (DefaultStore != NULL);\r
DefaultStore->Signature = FORMSET_DEFAULTSTORE_SIGNATURE;\r
\r
CopyMem (&DefaultStore->DefaultId, &((EFI_IFR_DEFAULTSTORE *) OpCodeData)->DefaultId, sizeof (UINT16));\r
// A Question may have more than one Default value which have different default types.\r
//\r
CurrentDefault = AllocateZeroPool (sizeof (QUESTION_DEFAULT));\r
+ ASSERT (CurrentDefault != NULL);\r
CurrentDefault->Signature = QUESTION_DEFAULT_SIGNATURE;\r
\r
CurrentDefault->Value.Type = ((EFI_IFR_DEFAULT *) OpCodeData)->Type;\r
// It create a selection for use in current Question.\r
//\r
CurrentOption = AllocateZeroPool (sizeof (QUESTION_OPTION));\r
+ ASSERT (CurrentOption != NULL);\r
CurrentOption->Signature = QUESTION_OPTION_SIGNATURE;\r
\r
CurrentOption->Flags = ((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Flags;\r
1) Framework module consuming FV is present\r
2) And the platform only produces FV2\r
\r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010 Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
FirmwareVolume2 = Private->FirmwareVolume2;\r
\r
PiFileData = AllocateCopyPool (sizeof (EFI_FV_WRITE_FILE_DATA), FileData);\r
+ ASSERT (PiFileData != NULL);\r
\r
//\r
// Framework Spec assume firmware files are Memory-Mapped.\r
@param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r
instance.\r
@param ConfigResp A null-terminated Unicode string in <ConfigResp>\r
- format. It can be ConfigAltResp format string.\r
+ format.\r
@param Block A possibly null array of bytes representing the\r
current block. Only bytes referenced in the\r
ConfigResp string in the block are modified. If\r
@param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r
instance.\r
@param Configuration A null-terminated Unicode string in\r
- <MultiConfigAltResp> format. It is <ConfigAltResp> format.\r
+ <MultiConfigAltResp> format.\r
@param Guid A pointer to the GUID value to search for in the\r
routing portion of the ConfigResp string when\r
retrieving the requested data. If Guid is NULL,\r
//\r
Status = GetValueByName (OpCode->VarStorage, OpCode->ValueName, &StrPtr);\r
if (!EFI_ERROR (Status)) {\r
+ ASSERT (StrPtr != NULL);\r
TempLength = StrLen (StrPtr);\r
if (OpCode->ValueWidth >= ((TempLength + 1) / 2)) {\r
Value->Type = OpCode->ValueType;\r
if ((Index & 1) == 0) {\r
TempBuffer [Index/2] = DigitUint8;\r
} else {\r
- TempBuffer [Index/2] = (UINT8) ((DigitUint8 << 4) + TempStr [Index/2]);\r
+ TempBuffer [Index/2] = (UINT8) ((DigitUint8 << 4) + TempBuffer [Index/2]);\r
}\r
}\r
} \r
//\r
if (CurrentExpression == NULL && MapScopeDepth > 0) {\r
CurrentExpression = CreateExpression (CurrentForm);\r
+ ASSERT (MapExpressionList != NULL);\r
InsertTailList (MapExpressionList, &CurrentExpression->Link);\r
if (Scope == 0) {\r
SingleOpCodeExpression = TRUE;\r
//\r
Status = PopCurrentExpression ((VOID **) &CurrentExpression);\r
ASSERT_EFI_ERROR (Status);\r
+ ASSERT (MapScopeDepth > 0);\r
MapScopeDepth --;\r
break;\r
\r
hit, then 2 Unicode character will consume an output storage\r
space with size of CHAR16 till a NARROW_CHAR is hit.\r
\r
+ If String is NULL, then ASSERT ().\r
+\r
@param String The input string to be counted.\r
\r
@return Storage space for the input string.\r
UINTN Count;\r
UINTN IncrementValue;\r
\r
+ ASSERT (String != NULL);\r
+ if (String == NULL) {\r
+ return 0;\r
+ }\r
+\r
Index = 0;\r
Count = 0;\r
IncrementValue = 1;\r
hit, then 2 Unicode character will consume an output storage\r
space with size of CHAR16 till a NARROW_CHAR is hit.\r
\r
+ If String is NULL, then ASSERT ().\r
+\r
@param String The input string to be counted.\r
\r
@return Storage space for the input string.\r