From a8bb80622894077537ef88b1dab0e80c62cc3984 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 16 May 2015 20:10:23 +0100 Subject: [PATCH] setbrk: but don't wipe shrinks of the stack! --- Applications/V7/cmd/sh/setbrk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Applications/V7/cmd/sh/setbrk.c b/Applications/V7/cmd/sh/setbrk.c index fe1b31a7..14a58b0f 100644 --- a/Applications/V7/cmd/sh/setbrk.c +++ b/Applications/V7/cmd/sh/setbrk.c @@ -16,7 +16,7 @@ void *setbrk(intptr_t incr) { uint8_t *a = sbrk(incr); brkend = a + incr; - if (a != (uint8_t *)-1) + if (a != (uint8_t *)-1 && incr > 0) memset(a, 0, incr); return a; } -- 2.34.1