[Open-scap] [PATCH 03/11] Zero memory when new cve_model is created
Marshall Miller
mmiller at tresys.com
Wed May 11 19:31:22 UTC 2011
---
src/CVE/cve_priv.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/CVE/cve_priv.c b/src/CVE/cve_priv.c
index 07d4f31..c0cb362 100644
--- a/src/CVE/cve_priv.c
+++ b/src/CVE/cve_priv.c
@@ -33,6 +33,8 @@
#include <config.h>
#endif
+#include <string.h>
+
#include <libxml/xmlreader.h>
#include <libxml/xmlwriter.h>
@@ -360,6 +362,7 @@ struct cve_model *cve_model_new()
ret = oscap_alloc(sizeof(struct cve_model));
if (ret == NULL)
return NULL;
+ memset(ret, 0, sizeof(struct cve_model));
ret->nvd_xml_version = NULL;
ret->entries = oscap_list_new();
--
1.6.2.5
More information about the Open-scap-list
mailing list