serge1 / ELFIO

ELFIO - ELF (Executable and Linkable Format) reader and producer implemented as a header only C++ library
http://serge1.github.io/ELFIO
MIT License
706 stars 152 forks source link

Validate that strings in table are null terminated #102

Closed Alan-Jowett closed 2 years ago

Alan-Jowett commented 2 years ago

Use strnlen to locate the end of the string (limit it to the end of the string table). Only return the string if the end of the string is entirely contained within the string table.

Signed-off-by: Alan Jowett alanjo@microsoft.com

serge1 commented 2 years ago

Accepted. Thank you very much!