fixed a bug with UE_SECTIONNAME in x64

This commit is contained in:
Mr. eXoDia 2014-05-09 21:52:14 +02:00
parent c6744a2602
commit 8ca6c8d869
1 changed files with 2 additions and 1 deletions

View File

@ -301,7 +301,8 @@ __declspec(dllexport) ULONG_PTR TITCALL GetPE32DataFromMappedFile(ULONG_PTR File
PESections = (PIMAGE_SECTION_HEADER)((ULONG_PTR)PESections + WhichSection * IMAGE_SIZEOF_SECTION_HEADER); PESections = (PIMAGE_SECTION_HEADER)((ULONG_PTR)PESections + WhichSection * IMAGE_SIZEOF_SECTION_HEADER);
if(WhichData == UE_SECTIONNAME) if(WhichData == UE_SECTIONNAME)
{ {
return((ULONG_PTR)PESections->Name); memcpy(sectionName, PESections->Name, 8);
return (ULONG_PTR)sectionName;
} }
else if(WhichData == UE_SECTIONVIRTUALOFFSET) else if(WhichData == UE_SECTIONVIRTUALOFFSET)
{ {