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.
2 parents 8032973 + fc21d13 commit 55d5db9Copy full SHA for 55d5db9
src/patchelf.cc
@@ -701,7 +701,7 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
701
/* Some sections may already be replaced so account for that */
702
unsigned int i = 1;
703
Elf_Addr pht_size = sizeof(Elf_Ehdr) + (phdrs.size() + num_notes + 1)*sizeof(Elf_Phdr);
704
- 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 ) {
705
if (not haveReplacedSection(getSectionName(shdrs.at(i))))
706
replaceSection(getSectionName(shdrs.at(i)), rdi(shdrs.at(i).sh_size));
707
i++;
0 commit comments