]> git.proxmox.com Git - mirror_edk2.git/commitdiff
A leaf section type may contains an array of zero or more bytes. Support the section...
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 14 Mar 2008 10:12:17 +0000 (10:12 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 14 Mar 2008 10:12:17 +0000 (10:12 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4852 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c

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