xoofx / LibObjectFile

LibObjectFile is a .NET library to read, manipulate and write linker and executable object files (e.g ELF, PE, DWARF, ar...)
BSD 2-Clause "Simplified" License
159 stars 11 forks source link

DwarfFile.ReadFromElf exception #25

Closed WhileNotInfinite closed 1 year ago

WhileNotInfinite commented 1 year ago

Hello

First of all thanks for your work and thanks to share it with others.

I'm having an issue while trying to read Dwarf of an ARM A53 (64 bits) elf file. APU0.zip

It throws an exception at line 71 of ObjectFileStreamExtensions.cs.

Variable textLength is getting greater than buffer size. I tried to change condition line 63 for " >= "instead of " > " but, for some reasons function take a very long time to execute and fails later for another reason.

I have attached my elf file, if you want to try to reproduced