Đoàn Trần Công Danh 957889af23 runit: update to 2.2.0.
2025-02-17 15:26:38 -05:00

19 lines
534 B
Diff

--- 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));