From: Alan Cox Date: Sat, 16 May 2015 19:09:04 +0000 (+0100) Subject: setbrk: possible paranoia for the moment X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d233810051bb7f5edd0d5239f8fb5b25b7b69dd1;p=FUZIX.git setbrk: possible paranoia for the moment ensure our new sbrk space is clean --- diff --git a/Applications/V7/cmd/sh/setbrk.c b/Applications/V7/cmd/sh/setbrk.c index 618edf73..fe1b31a7 100644 --- a/Applications/V7/cmd/sh/setbrk.c +++ b/Applications/V7/cmd/sh/setbrk.c @@ -10,10 +10,13 @@ */ #include "defs.h" +#include void *setbrk(intptr_t incr) { uint8_t *a = sbrk(incr); brkend = a + incr; + if (a != (uint8_t *)-1) + memset(a, 0, incr); return a; }