Fixing invalid reads in find_elf_note due to setenv invocation