From: Alan Cox Date: Fri, 15 May 2015 21:37:11 +0000 (+0100) Subject: sbrk: A negative sbrk is permissible, in fact /bin/sh uses it X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=2ebe4a27013a98bd59b827a25f4793186d084a9c;p=FUZIX.git sbrk: A negative sbrk is permissible, in fact /bin/sh uses it --- diff --git a/Kernel/syscall_proc.c b/Kernel/syscall_proc.c index 402e7d81..220dbbc3 100644 --- a/Kernel/syscall_proc.c +++ b/Kernel/syscall_proc.c @@ -245,8 +245,6 @@ arg_t _sbrk(void) uaddr_t oldbrk; udata.u_argn += (oldbrk = udata.u_break); - if ((unsigned) udata.u_argn < oldbrk) - return (-1); if (_brk()) /* brk (udata.u_argn) */ return (-1);