diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-03-14 10:12:17 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-03-14 10:12:17 +0000 |
commit | e10293550f62474596d955e44a5af97b0d412305 (patch) | |
tree | 81ee895f7b1cb41fc7541505bc62b53937df9de6 /MdeModulePkg/Core/Dxe | |
parent | 4beb4afe33ed6f3baaf126b146a1a9014d4d932f (diff) | |
download | edk2-e10293550f62474596d955e44a5af97b0d412305.zip edk2-e10293550f62474596d955e44a5af97b0d412305.tar.gz edk2-e10293550f62474596d955e44a5af97b0d412305.tar.bz2 |
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
Diffstat (limited to 'MdeModulePkg/Core/Dxe')
-rw-r--r-- | MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c index 94eb08b..8d33322 100644 --- a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c +++ b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c @@ -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)) {
|