Fix missing validation of program entry points.

This commit is contained in:
Jonas 'Sortie' Termansen 2016-05-17 17:06:14 +02:00
parent b54e09ebaf
commit 1dbd1f760a
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ uintptr_t Load(const void* file_ptr, size_t file_size, Auxiliary* aux)
if ( header->e_type != ET_EXEC )
return errno = EINVAL, 0;
if ( header->e_entry == 0 )
if ( header->e_entry < userspace_addr || userspace_end <= header->e_entry )
return errno = EINVAL, 0;
if ( file_size < header->e_phoff )