konrad-kruczynski / elfsharp

Pure managed C# library for reading ELF, UImage, Mach-O binaries.
https://elfsharp.it
Other
159 stars 57 forks source link

ELFReader methods do not always close streams #91

Closed ljusten closed 1 year ago

ljusten commented 1 year ago

If shouldOwnStream is true, the methods should close the stream if loading fails. Otherwise, for instance ELFReader.TryLoad(filename, out IELF elf) won't close the stream if the file is not an ELF file.

konrad-kruczynski commented 1 year ago

Confirmed, will fix that.

konrad-kruczynski commented 1 year ago

ELFSharp 2.16.1 published, closing ticket.

ljusten commented 1 year ago

Thanks!