Skip to content

Commit

Permalink
proc/process_load (NOMMU): fix phdr size check
Browse files Browse the repository at this point in the history
JIRA: RTOS-875
  • Loading branch information
lukileczo committed Aug 2, 2024
1 parent 6624da0 commit 764a9df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proc/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ int process_load(process_t *process, vm_object_t *o, off_t base, size_t size, vo
}

if (phdr->p_filesz != 0) {
if ((phdr->p_offset + round_page(phdr->p_filesz)) > size) {
if ((phdr->p_offset + phdr->p_filesz) > size) {
return -ENOEXEC;
}

Expand Down

0 comments on commit 764a9df

Please sign in to comment.