diff --git a/.gitignore b/.gitignore index 39713810..921b9f85 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,7 @@ Makefile /tests/libbig-dynstr.debug /tests/contiguous-note-sections /tests/simple-pie + +.direnv/ +.vscode/ +.idea/ diff --git a/src/patchelf.cc b/src/patchelf.cc index 1aeae88f..eaf2a42f 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -1237,7 +1237,7 @@ template std::string ElfFile::getInterpreter() { auto shdr = findSection(".interp"); - return std::string((char *) fileContents->data() + rdi(shdr.sh_offset), rdi(shdr.sh_size)); + return std::string((char *) fileContents->data() + rdi(shdr.sh_offset), rdi(shdr.sh_size) - 1); } template