From: Alan Cox Date: Sat, 26 May 2018 10:16:02 +0000 (+0100) Subject: execve: check for binaries too low to load X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=021de38b112f36c73a2e0ef775808b11714c249a;p=FUZIX.git execve: check for binaries too low to load This got broken when the changes were added to allow high address binaries to be loaded into big memory windows. The real fix is to go to relocatable binaries of course --- diff --git a/Kernel/syscall_exec16.c b/Kernel/syscall_exec16.c index d76eaf0f..64144248 100644 --- a/Kernel/syscall_exec16.c +++ b/Kernel/syscall_exec16.c @@ -105,7 +105,7 @@ arg_t _execve(void) /* FIXME: review overflows */ bin_size = ino->c_node.i_size; progptr = bin_size + 1024 + bss; - if (top - progload < progptr || progptr < bin_size) { + if (progload < PROGLOAD || top - progload < progptr || progptr < bin_size) { udata.u_error = ENOMEM; goto nogood2; }