Skip to content

Section Add - Virtual Address Alignment #3

@upiter

Description

@upiter

Section Add - Virtual Address Alignment

Info

Incorrect calculation of Virtual Address while adding new section.

Details

Example with PETools.exe. Adding section, getting wrong values.

How to reproduce:

  • Open PETools.exe in PE Tools (not running copy, sure).
  • Open Section Editor -> Add Section

Two last sections details after adding new section

Previous section:

Name Value Remaks
Raw Size 00006400
Raw Offset 00112A00
Virtual Size 00006360
Virtual Address 0011B000

New section:

Name Value Remaks
Raw Size 00000200
Raw Offset 00118E00
Virtual Size 00001000
Virtual Address 0011C000 Invalid. Should be 00122000

Source to fix

  • SectionsDlg.cpp
    • CreateSectionsDlg
    • AddNewSection
    • AddSection_File
    • AddSection_FillZero
    • AddSection_HeaderOnly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions