#227 [PATCH]SectionHeader.PointerToRawData not fixed

open
Amir Szekely
NSIS (71)
5
2010-07-15
2010-07-15
Anonymous
No

AdjustVA() returns new value instead of changing it, so the sectionHeadersArray[i].PointerToRawData has not been fixed actually.
This bug doesn't affect the installer building.

Index: ResourceEditor.cpp

--- ResourceEditor.cpp (revision 6119)
+++ ResourceEditor.cpp (working copy)
@@ -466,7 +466,7 @@
PIMAGE_DATA_DIRECTORY pDataDirectory = *GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, DataDirectory);
for (i = m_dwResourceSectionIndex + 1; i < wNumberOfSections; i++) {
if (sectionHeadersArray[i].PointerToRawData) {
- AdjustVA(sectionHeadersArray[i].PointerToRawData, dwRsrcSizeAligned - dwOldRsrcSize);
+ sectionHeadersArray[i].PointerToRawData = AdjustVA(sectionHeadersArray[i].PointerToRawData, dwRsrcSizeAligned - dwOldRsrcSize);
}

// We must find the right data directory entry before we change the virtual address

Discussion


  • Anonymous
    2010-07-15

    patch for ResourceEditor.cpp

     
    Attachments