public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31fca45
)
setbrk: possible paranoia for the moment
author
Alan Cox
<alan@linux.intel.com>
Sat, 16 May 2015 19:09:04 +0000
(20:09 +0100)
committer
Alan Cox
<alan@linux.intel.com>
Sat, 16 May 2015 19:09:04 +0000
(20:09 +0100)
ensure our new sbrk space is clean
Applications/V7/cmd/sh/setbrk.c
patch
|
blob
|
history
diff --git
a/Applications/V7/cmd/sh/setbrk.c
b/Applications/V7/cmd/sh/setbrk.c
index
618edf7
..
fe1b31a
100644
(file)
--- a/
Applications/V7/cmd/sh/setbrk.c
+++ b/
Applications/V7/cmd/sh/setbrk.c
@@
-10,10
+10,13
@@
*/
#include "defs.h"
+#include <string.h>
void *setbrk(intptr_t incr)
{
uint8_t *a = sbrk(incr);
brkend = a + incr;
+ if (a != (uint8_t *)-1)
+ memset(a, 0, incr);
return a;
}