summaryrefslogtreecommitdiff
path: root/core/runit/clearmem.patch
diff options
context:
space:
mode:
Diffstat (limited to 'core/runit/clearmem.patch')
-rw-r--r--core/runit/clearmem.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/runit/clearmem.patch b/core/runit/clearmem.patch
new file mode 100644
index 0000000..c244c81
--- /dev/null
+++ b/core/runit/clearmem.patch
@@ -0,0 +1,18 @@
+--- a/src/svlogd.c
++++ b/src/svlogd.c
+@@ -8,6 +8,7 @@
+ #include <dirent.h>
+ #include <unistd.h>
+ #include <stdio.h>
++#include <string.h>
+ #include "pmatch.h"
+ #include "fmt_ptime.h"
+ #include "alloc.h"
+@@ -706,6 +707,7 @@ int main(int argc, char **argv) {
+ coe(fdwdir);
+ dir =(struct logdir*)alloc(dirn *sizeof(struct logdir));
+ if (! dir) die_nomem();
++ memset(dir, 0, dirn * sizeof(struct logdir));
+ for (i =0; i < dirn; ++i) {
+ dir[i].fddir =-1; dir[i].fdcur =-1;
+ dir[i].btmp =(char*)alloc(buflen *sizeof(char));