- Use raw size for image sections if virtual size isn't specified. Patch by Nathan Lineback <lineback@toastytech.com> from BugZilla #364.

svn path=/trunk/; revision=9744
This commit is contained in:
Filip Navara 2004-06-20 10:21:48 +00:00
parent 9fc35cab4e
commit 39d8412f56

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: section.c,v 1.151 2004/06/06 08:36:31 hbirr Exp $
/* $Id: section.c,v 1.152 2004/06/20 10:21:48 navaraf Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/section.c
@ -2966,7 +2966,14 @@ MmCreateImageSection(PHANDLE SectionHandle,
}
SectionSegments[i].RawLength = ImageSections[i-1].SizeOfRawData;
SectionSegments[i].Length = ImageSections[i-1].Misc.VirtualSize;
if (ImageSections[i-1].Misc.VirtualSize != 0)
{
SectionSegments[i].Length = ImageSections[i-1].Misc.VirtualSize;
}
else
{
SectionSegments[i].Length = ImageSections[i-1].SizeOfRawData;
}
SectionSegments[i].Flags = 0;
SectionSegments[i].ReferenceCount = 1;
SectionSegments[i].VirtualAddress = (PVOID)ImageSections[i-1].VirtualAddress;