Skip to content

Commit

Permalink
Return blank section name for Certificate Table, it doesn't fall with…
Browse files Browse the repository at this point in the history
…in a section.
  • Loading branch information
lkinsella committed Jun 13, 2016
1 parent 015533c commit c5fde9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Workshell.PE/DataDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ public DataDirectoryContent GetContent()

private string GetSectionName()
{
if (data_dir.VirtualAddress == 0)
if (data_dir.VirtualAddress == 0 || dir_type == DataDirectoryType.CertificateTable)
return String.Empty;

foreach(SectionTableEntry entry in dirs.Reader.SectionTable)
{
if (data_dir.VirtualAddress >= entry.VirtualAddress && data_dir.VirtualAddress <= (entry.VirtualAddress + entry.SizeOfRawData))
if (data_dir.VirtualAddress >= entry.VirtualAddress && data_dir.VirtualAddress < (entry.VirtualAddress + entry.SizeOfRawData))
return entry.Name;
}

Expand Down

0 comments on commit c5fde9c

Please sign in to comment.