We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b27dc4 commit eb1f61aCopy full SHA for eb1f61a
src/patchelf.cc
@@ -679,7 +679,7 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
679
/* Some sections may already be replaced so account for that */
680
unsigned int i = 1;
681
Elf_Addr pht_size = sizeof(Elf_Ehdr) + (phdrs.size() + num_notes + 1)*sizeof(Elf_Phdr);
682
- while( rdi(shdrs.at(i).sh_offset) <= pht_size && i < rdi(hdr()->e_shnum) ) {
+ while( i < rdi(hdr()->e_shnum) && rdi(shdrs.at(i).sh_offset) <= pht_size ) {
683
if (not haveReplacedSection(getSectionName(shdrs.at(i))))
684
replaceSection(getSectionName(shdrs.at(i)), rdi(shdrs.at(i).sh_size));
685
i++;
0 commit comments