Skip to content

Is this PR(https://github.com/0xd4d/dnlib/pull/428) right? #575

Description

@CreateAndInject

@wtfsck Is this PR(#428) right?

public ImageSectionHeader ToImageSectionHeader(RVA rva) {
	uint alignment = imageNTHeaders.OptionalHeader.SectionAlignment;
	foreach (var section in imageSectionHeaders) {
		if (rva >= section.VirtualAddress && rva < section.VirtualAddress + DotNet.Utils.AlignUp(section.VirtualSize, alignment))
			return section;
	}
	return null;
}

As you can see, if VirtualSize = 0, this PR by @wwh1004 can't find anything, but the previous code work fine.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions