void-packages/srcpkgs/runit/patches/clearmem.patch

12 lines
489 B
Diff

diff -Naur runit-2.1.2/src/svlogd.c runit-2.1.2/src/svlogd.c
--- runit-2.1.2/src/svlogd.c 2014-08-10 11:22:34.000000000 -0700
+++ runit-2.1.2/src/svlogd.c 2018-03-03 03:28:08.243085845 -0800
@@ -705,6 +705,7 @@
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));