A leaf section type may contains an array of zero or more bytes. Support the section with the zero data.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4852 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2008-03-14 10:12:17 +00:00
parent 4beb4afe33
commit e10293550f
1 changed files with 3 additions and 1 deletions

View File

@ -581,11 +581,13 @@ Returns:
}
if (IsListEmpty (&SourceStream->Children) &&
SourceStream->StreamLength > sizeof (EFI_COMMON_SECTION_HEADER)) {
SourceStream->StreamLength >= sizeof (EFI_COMMON_SECTION_HEADER)) {
//
// This occurs when a section stream exists, but no child sections
// have been parsed out yet. Therefore, extract the first child and add it
// to the list of children so we can get started.
// Section stream may contain an array of zero or more bytes.
// So, its size should be >= the size of commen section header.
//
Status = CreateChildNode (SourceStream, 0, &CurrentChildNode);
if (EFI_ERROR (Status)) {