mirror of
https://github.com/serge1/ELFIO.git
synced 2025-01-30 15:32:44 +00:00
Kevin Klues
e3e0d6dbdb
Fixed off-by-one error in 'name' of add_note() function.
Previously, when assigning 'name' as a string, it's length was specified using the full length of 'namesz'. However, this length includes the trailing '\0' of the underlying char[]. This ultimately causes the C++ string that is created to (incorrectly) contain the '\0' character as well. This leads to problems where e.g. the following will return false, even when 'name' itself actually contains the string "GNU\0": if (name == "GNU") { return true; } return false; To fix this, we should only include the length of the string minus the trailing '\0'.
ELFIO is a header-only C++ library intended for reading and generating files in the ELF binary format. It is used as a standalone library - it is not dependant on any other product or project. Adhering to ISO C++, it compiles on a wide variety of architectures and compilers.
Description
ELFIO - ELF (Executable and Linkable Format) reader and producer implemented as a header only C++ library
c-plus-pluscpluspluscppcpp-librarycpp-programmingcpp-projectelfelf-binarieself-headerelf-loaderelf-parserelf64elfio
Readme
19 MiB
Languages
C++
98.1%
CMake
1.7%
Assembly
0.1%