3) A support protocol is not found, and the data is not available to be read\r
without it. This results in EFI_PROTOCOL_ERROR.\r
\r
-Copyright (c) 2006 - 2009, 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
)\r
{\r
FRAMEWORK_SECTION_STREAM_NODE *NewStream;\r
- EFI_TPL OldTpl;\r
+ EFI_TPL OldTpl;\r
\r
//\r
// Allocate a new stream\r
ChildIsType (\r
IN FRAMEWORK_SECTION_STREAM_NODE *Stream,\r
IN FRAMEWORK_SECTION_CHILD_NODE *Child,\r
- IN EFI_SECTION_TYPE SearchType,\r
- IN EFI_GUID *SectionDefinitionGuid\r
+ IN EFI_SECTION_TYPE SearchType,\r
+ IN EFI_GUID *SectionDefinitionGuid\r
)\r
{\r
EFI_GUID_DEFINED_SECTION *GuidedSection;\r
if (Child->Type != SearchType) {\r
return FALSE;\r
}\r
- if (SearchType != EFI_SECTION_GUID_DEFINED) {\r
+ if ((SearchType != EFI_SECTION_GUID_DEFINED) || (SectionDefinitionGuid == NULL)) {\r
return TRUE;\r
}\r
GuidedSection = (EFI_GUID_DEFINED_SECTION * )(Stream->StreamBuffer + Child->OffsetInStream);\r
// Make sure we initialize the new stream with the correct \r
// authentication status for both aggregate and local status fields.\r
//\r
- if ((GuidedHeader->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID) != 0) {\r
+ if ((GuidedHeader->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID) == EFI_GUIDED_SECTION_AUTH_STATUS_VALID) {\r
//\r
// OR in the parent stream's aggregate status.\r
//\r
//\r
// There's no GUIDed section extraction protocol available.\r
//\r
- if ((GuidedHeader->Attributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 0) {\r
+ if ((GuidedHeader->Attributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) == EFI_GUIDED_SECTION_PROCESSING_REQUIRED) {\r
//\r
// If the section REQUIRES an extraction protocol, then we're toast\r
//\r
// Figure out the proper authentication status\r
//\r
AuthenticationStatus = Stream->AuthenticationStatus;\r
- if (GuidedHeader->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID) {\r
+ if ((GuidedHeader->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID) == EFI_GUIDED_SECTION_AUTH_STATUS_VALID) {\r
//\r
// The local status of the new stream is contained in \r
// AuthenticaionStatus. This value needs to be ORed into the\r
}\r
}\r
\r
+ ASSERT (CurrentChildNode != NULL);\r
if (CurrentChildNode->EncapsulatedStreamHandle != NULL_STREAM_HANDLE) {\r
//\r
// If the current node is an encapsulating node, recurse into it...\r
OUT UINT32 *AuthenticationStatus\r
)\r
{\r
- FRAMEWORK_SECTION_STREAM_NODE *StreamNode;\r
+ FRAMEWORK_SECTION_STREAM_NODE *StreamNode;\r
EFI_TPL OldTpl;\r
EFI_STATUS Status;\r
- FRAMEWORK_SECTION_CHILD_NODE *ChildNode;\r
- FRAMEWORK_SECTION_STREAM_NODE *ChildStreamNode;\r
+ FRAMEWORK_SECTION_CHILD_NODE *ChildNode;\r
+ FRAMEWORK_SECTION_STREAM_NODE *ChildStreamNode;\r
UINTN CopySize;\r
UINT32 ExtractedAuthenticationStatus;\r
UINTN Instance;\r
if (EFI_ERROR (Status)) {\r
goto GetSection_Done;\r
}\r
+ ASSERT (ChildNode != NULL);\r
+ ASSERT (ChildStreamNode != NULL);\r
CopySize = ChildNode->Size - sizeof (EFI_COMMON_SECTION_HEADER);\r
CopyBuffer = ChildStreamNode->StreamBuffer + ChildNode->OffsetInStream + sizeof (EFI_COMMON_SECTION_HEADER);\r
*AuthenticationStatus = ExtractedAuthenticationStatus;\r