diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | runtime/msg.c | 11 |
2 files changed, 16 insertions, 3 deletions
@@ -1,4 +1,12 @@ --------------------------------------------------------------------------- +Version 7.1.1 [devel] 2012-09-?? +- imuxsock now stores trusted properties by default in the CEE root + This was done in order to keep compatible with other implementations of + the lumberjack schema + Thanks to Miloslav Trmač for pointing to this. +- bugfix: string-generating templates caused abort if CEE field could not + be found +--------------------------------------------------------------------------- Version 7.1.0 [devel] 2012-09-06 - added support for hierarchical properties (CEE/lumberjack) - added pure JSON output plugin parameter passing mode diff --git a/runtime/msg.c b/runtime/msg.c index afc79042..f1f7997c 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -2434,10 +2434,15 @@ dbgprintf("AAAA: leaf '%s'\n", leaf); CHKiRet(jsonPathFindParent(pM, name, leaf, &parent, 1)); field = json_object_object_get(parent, (char*)leaf); } - *pRes = (uchar*) strdup(json_object_get_string(field)); + if(field == 0) { + *pRes = (uchar*) ""; + *pbMustBeFreed = 0; + } else { + *pRes = (uchar*) strdup(json_object_get_string(field)); dbgprintf("AAAA: json_object_get_string() returns '%s'\n", *pRes); - *buflen = (int) ustrlen(*pRes); - *pbMustBeFreed = 1; + *buflen = (int) ustrlen(*pRes); + *pbMustBeFreed = 1; + } finalize_it: free(name); |