diff options
author | Ivan Povazan <55002338+ivanpovazan@users.noreply.github.com> | 2020-05-14 20:37:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 20:37:23 +0300 |
commit | ce1ae875d32a4d303afbdfbf1564fe2da4d12b84 (patch) | |
tree | b57140a6952a04f1314211a70e97ac8bab3f9c92 /Mono.Cecil.PE | |
parent | f74703c36e9a7626ef435399c45d27a84b246864 (diff) |
Removing the assumption that StringHeap is always present in the metadata when computing table information (#665) (#666)
Co-authored-by: ivan <ivan@raincode.com>
Diffstat (limited to 'Mono.Cecil.PE')
-rw-r--r-- | Mono.Cecil.PE/ImageReader.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Mono.Cecil.PE/ImageReader.cs b/Mono.Cecil.PE/ImageReader.cs index 9731ba9..84fdeb6 100644 --- a/Mono.Cecil.PE/ImageReader.cs +++ b/Mono.Cecil.PE/ImageReader.cs @@ -481,7 +481,7 @@ namespace Mono.Cecil.PE { { uint offset = (uint) BaseStream.Position - table_heap_offset - image.MetadataSection.PointerToRawData; // header - int stridx_size = image.StringHeap.IndexSize; + int stridx_size = image.StringHeap != null ? image.StringHeap.IndexSize : 2; int guididx_size = image.GuidHeap != null ? image.GuidHeap.IndexSize : 2; int blobidx_size = image.BlobHeap != null ? image.BlobHeap.IndexSize : 2; |