Skip to content
Snippets Groups Projects
Commit 2cc02035 authored by nkennedy's avatar nkennedy
Browse files

fix underflow/buffer overrun bug. ok nkennedy@ ip:peasoup

Former-commit-id: d89cc386835ee6f1eedc45e7f9c5de5f066b1a7d
parent 398a5f38
No related branches found
No related tags found
No related merge requests found
......@@ -394,12 +394,13 @@ void find_strings_in_data(FileIR_t* firp, elf_info_t& ei, pqxx::largeobjectacces
{
for(int i=0;i<ei.secnum;i++)
{
/* skip executable, hash, string table, and nonloadable sections */
/* skip executable, hash, string table, nonloadable, and tiny sections */
if( (ei.sechdrs[i].sh_flags & SHF_EXECINSTR)
|| ei.sechdrs[i].sh_type == SHT_HASH
|| ei.sechdrs[i].sh_type == SHT_GNU_HASH
|| ei.sechdrs[i].sh_type == SHT_STRTAB
|| (ei.sechdrs[i].sh_flags & SHF_ALLOC) != SHF_ALLOC)
|| (ei.sechdrs[i].sh_flags & SHF_ALLOC) != SHF_ALLOC
|| ei.sechdrs[i].sh_size < sizeof(void*))
continue;
int offset = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment