summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--runtime/net.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b8f24cf1..ef7daee0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
---------------------------------------------------------------------------
Version 3.19.6 (rgerhards), 2008-06-??
+- bugfix: part of permittedPeer structure was not correctly initialized
+ thanks to varmojfekoj for spotting this
---------------------------------------------------------------------------
Version 3.19.5 (rgerhards), 2008-05-30
- enabled Posix ERE expressions inside the property replacer
diff --git a/runtime/net.c b/runtime/net.c
index ca12acd8..89e0838b 100644
--- a/runtime/net.c
+++ b/runtime/net.c
@@ -214,9 +214,8 @@ AddPermittedPeer(permittedPeers_t **ppRootPeer, uchar* pszID)
assert(ppRootPeer != NULL);
assert(pszID != NULL);
- CHKmalloc(pNew = malloc(sizeof(permittedPeers_t)));
+ CHKmalloc(pNew = calloc(1, sizeof(permittedPeers_t))); /* we use calloc() for consistency with "real" objects */
CHKmalloc(pNew->pszID = (uchar*)strdup((char*)pszID));
- pNew->pNext = NULL;
if(*ppRootPeer != NULL) {
pNew->pNext = *ppRootPeer;