From 8ec098dcf10bf63d51c463ea5a6a53d953a2587a Mon Sep 17 00:00:00 2001 From: cypherpunk Date: Mon, 25 Nov 2013 00:53:52 +0100 Subject: [PATCH] now really: fixed Dumper::GetPE32Data(char*, DWORD, UE_SECTIONNAME) returning bad ptr --- TitanEngine/TitanEngine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TitanEngine/TitanEngine.cpp b/TitanEngine/TitanEngine.cpp index 3f2aa70..914124e 100644 --- a/TitanEngine/TitanEngine.cpp +++ b/TitanEngine/TitanEngine.cpp @@ -5005,6 +5005,7 @@ __declspec(dllexport) long long TITCALL GetPE32DataFromMappedFile(ULONG_PTR File PIMAGE_SECTION_HEADER PESections; DWORD SectionNumber = 0; BOOL FileIs64; + static char sectionName[8] = ""; if(FileMapVA != NULL) { @@ -5135,7 +5136,8 @@ __declspec(dllexport) long long TITCALL GetPE32DataFromMappedFile(ULONG_PTR File PESections = (PIMAGE_SECTION_HEADER)((ULONG_PTR)PESections + WhichSection * IMAGE_SIZEOF_SECTION_HEADER); if(WhichData == UE_SECTIONNAME) { - return((ULONG)*((DWORD*)PESections->Name)); + memcpy(sectionName, PESections->Name, 8); + return (long long)sectionName; } else if(WhichData == UE_SECTIONVIRTUALOFFSET) {