From 258116aaa3e5c9b48394c7a4911efdadbf4187d1 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Mon, 12 Oct 2009 19:33:56 +0200 Subject: Note to self: it's more clever to use strdup_nullsafe() than strdup() ... --- server/parser/xmlparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/parser/xmlparser.c') diff --git a/server/parser/xmlparser.c b/server/parser/xmlparser.c index 3ab99bb..70308d0 100644 --- a/server/parser/xmlparser.c +++ b/server/parser/xmlparser.c @@ -127,7 +127,7 @@ char *sqldataValueHash(xmlNode *sql_n) { hash = xmlGetAttrValue(sql_n->properties, "hash"); if( !hash ) { // If no hash attribute is found, just use the raw data - ret = strdup(xmlExtractContent(sql_n)); + ret = strdup_nullsafe(xmlExtractContent(sql_n)); } else if( strcasecmp(hash, "sha1") == 0 ) { const char *indata = xmlExtractContent(sql_n); // SHA1 hashing requested -- cgit