[NTOS:MM] Ignore sections either PointerToRawData or SizeOfRawData is zero

VC1 Linker fills BSS.SizeOfRawData with data in IMAGE_OPTIONAL_HEADER.SizeOfUninitializedData but keeps PointerToRawData to zero.

CORE-18797
This commit is contained in:
Roy Tam 2023-01-20 17:02:12 +08:00
parent e89675768b
commit 0d4a8d0ea6

View file

@ -814,7 +814,7 @@ l_ReadHeaderFromFile:
DIE(("Memory gap between section %u and the previous\n", i));
/* ignore explicit BSS sections */
if(pishSectionHeaders[i].SizeOfRawData != 0)
if(pishSectionHeaders[i].PointerToRawData != 0 && pishSectionHeaders[i].SizeOfRawData != 0)
{
/* validate the alignment */
#if 0