Wasn't sure whether to file this as an issue in this crate or in your xmas-elf crate, but I chose here because the lowest-level change should be made here.
In the read_str()
function, there is the potential to panic on the expect
statement. When parsing a file (such as an ELF file using your xmas-elf crate), some symbols may not be encoded as UTF-8, so it'd be nice to be able to skip them and recover gracefully through a returned Result
, rather than simply panicking and aborting the entire parse thread.
If you're okay with that change, I'm happy to submit a pull request to both this and the xmas-elf crate.
Also, thanks a lot for this and the xmas-elf crate, and also for making the change for my previous issue with the elf flags. It's really saved me a lot of time!!