From: Alan Cox Date: Sun, 20 Jan 2019 00:49:36 +0000 (+0000) Subject: syscall_exec32: report ENOMEM properly for outsized binaries X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=6137df2e8bba2c3d2b7f5392a1d78babda4564f8;p=FUZIX.git syscall_exec32: report ENOMEM properly for outsized binaries --- diff --git a/Kernel/syscall_exec32.c b/Kernel/syscall_exec32.c index 688f1e7a..abcdffb2 100644 --- a/Kernel/syscall_exec32.c +++ b/Kernel/syscall_exec32.c @@ -182,7 +182,8 @@ arg_t _execve(void) /* This must be the last test as it makes changes if it works */ /* FIXME: need to update this to support split code/data and to fix stack handling nicely */ - if (pagemap_realloc(0, bin_size, 0)) + /* FIXME: ENOMEM fix needs to go to 16bit ? */ + if ((udata.u_error = pagemap_realloc(0, bin_size, 0)) != 0) goto nogood3; /* Core dump and ptrace permission logic */