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 683e41d commit fc21d13Copy full SHA for fc21d13
src/patchelf.cc
@@ -689,7 +689,7 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
689
/* Some sections may already be replaced so account for that */
690
unsigned int i = 1;
691
Elf_Addr pht_size = sizeof(Elf_Ehdr) + (phdrs.size() + num_notes + 1)*sizeof(Elf_Phdr);
692
- 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 ) {
693
if (not haveReplacedSection(getSectionName(shdrs.at(i))))
694
replaceSection(getSectionName(shdrs.at(i)), rdi(shdrs.at(i).sh_size));
695
i++;
0 commit comments