Skip to content
Snippets Groups Projects
Commit 709cd64c authored by Jason Hiser's avatar Jason Hiser
Browse files

fixed off-by-one error in getting segment to be extended in gapallocate

parent 018f476a
No related branches found
No related tags found
No related merge requests found
Pipeline #373 failed
...@@ -406,7 +406,7 @@ bool ElfWriterImpl<T_Elf_Ehdr,T_Elf_Phdr,T_Elf_Addr,T_Elf_Shdr,T_Elf_Sym, T_Elf_ ...@@ -406,7 +406,7 @@ bool ElfWriterImpl<T_Elf_Ehdr,T_Elf_Phdr,T_Elf_Addr,T_Elf_Shdr,T_Elf_Sym, T_Elf_
} }
// find segment // find segment
int new_phdr_segment_index=locate_segment_index(new_phdr_addr); int new_phdr_segment_index=locate_segment_index(new_phdr_addr-1);
// if there's no segment for the start, we'll have to allocate a page anyhow. just use the _Preallocate routine. // if there's no segment for the start, we'll have to allocate a page anyhow. just use the _Preallocate routine.
if(new_phdr_segment_index==-1) if(new_phdr_segment_index==-1)
......
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