INN commit: trunk (5 files)

INN Commit rra at isc.org
Thu Jun 25 20:00:51 UTC 2015


    Date: Thursday, June 25, 2015 @ 13:00:51
  Author: iulius
Revision: 9908

Properly initialize innconf struct

Thanks to Richard Kettlewell for the patch.

Modified:
  trunk/lib/innconf.c
  trunk/tests/innd/artparse-t.c
  trunk/tests/overview/api-t.c
  trunk/tests/overview/overview-t.c
  trunk/tests/overview/xref-t.c

-----------------------------+
 lib/innconf.c               |    1 +
 tests/innd/artparse-t.c     |    1 +
 tests/overview/api-t.c      |    1 +
 tests/overview/overview-t.c |    1 +
 tests/overview/xref-t.c     |    1 +
 5 files changed, 5 insertions(+)

Modified: lib/innconf.c
===================================================================
--- lib/innconf.c	2015-06-25 19:44:59 UTC (rev 9907)
+++ lib/innconf.c	2015-06-25 20:00:51 UTC (rev 9908)
@@ -406,6 +406,7 @@
     struct innconf *config;
 
     config = xmalloc(sizeof(struct innconf));
+    memset(config, 0, sizeof(struct innconf));
     for (i = 0; i < ARRAY_SIZE(config_table); i++)
         switch (config_table[i].type) {
         case TYPE_BOOLEAN:

Modified: tests/innd/artparse-t.c
===================================================================
--- tests/innd/artparse-t.c	2015-06-25 19:44:59 UTC (rev 9907)
+++ tests/innd/artparse-t.c	2015-06-25 20:00:51 UTC (rev 9908)
@@ -59,6 +59,7 @@
         free(innconf);
     }
     innconf = xmalloc(sizeof(*innconf));
+    memset(innconf, 0, sizeof(*innconf));
     innconf->logipaddr = false;
     innconf->maxartsize = 8 * 1024;
     innconf->pathetc = xstrdup("../data/etc");

Modified: tests/overview/api-t.c
===================================================================
--- tests/overview/api-t.c	2015-06-25 19:44:59 UTC (rev 9907)
+++ tests/overview/api-t.c	2015-06-25 20:00:51 UTC (rev 9908)
@@ -74,6 +74,7 @@
         free(innconf);
     }
     innconf = xmalloc(sizeof(*innconf));
+    memset(innconf, 0, sizeof(*innconf));
     innconf->enableoverview = true;
     innconf->groupbaseexpiry = true;
     innconf->icdsynccount = 10;

Modified: tests/overview/overview-t.c
===================================================================
--- tests/overview/overview-t.c	2015-06-25 19:44:59 UTC (rev 9907)
+++ tests/overview/overview-t.c	2015-06-25 20:00:51 UTC (rev 9908)
@@ -86,6 +86,7 @@
         free(innconf);
     }
     innconf = xmalloc(sizeof(*innconf));
+    memset(innconf, 0, sizeof(*innconf));
     innconf->enableoverview = true;
     innconf->groupbaseexpiry = true;
     innconf->icdsynccount = 10;

Modified: tests/overview/xref-t.c
===================================================================
--- tests/overview/xref-t.c	2015-06-25 19:44:59 UTC (rev 9907)
+++ tests/overview/xref-t.c	2015-06-25 20:00:51 UTC (rev 9908)
@@ -25,6 +25,7 @@
 fake_innconf(void)
 {
     innconf = xmalloc(sizeof(*innconf));
+    memset(innconf, 0, sizeof(*innconf));
     innconf->articlemmap = true;
     innconf->enableoverview = true;
     innconf->groupbaseexpiry = true;



More information about the inn-committers mailing list