summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-23 14:21:14 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-23 14:21:14 +0200
commita7ba3df55c3283da23ac202d13ed266cc3f0d02f (patch)
tree272db5906c02eff8a14aac2ea6fd8286de618b21 /runtime/msg.c
parenteb9adf9baad5dca9dc2f30f45dc6eaf7607ac8f8 (diff)
downloadrsyslog-a7ba3df55c3283da23ac202d13ed266cc3f0d02f.tar.gz
rsyslog-a7ba3df55c3283da23ac202d13ed266cc3f0d02f.tar.bz2
rsyslog-a7ba3df55c3283da23ac202d13ed266cc3f0d02f.zip
fix potential segfault introduced by last refactoring
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index 407fee72..1fe390c6 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -2597,6 +2597,11 @@ msgGetJSONPropJSON(msg_t *pMsg, msgPropDescr_t *pProp, struct json_object **pjso
pProp->id);
ABORT_FINALIZE(RS_RET_NOT_FOUND);
}
+ if(jroot == NULL) {
+ DBGPRINTF("msgGetJSONPropJSON; jroot empty for property %s\n",
+ pProp->name);
+ ABORT_FINALIZE(RS_RET_NOT_FOUND);
+ }
if(!strcmp((char*)pProp->name, "!")) {
*pjson = jroot;
@@ -3864,7 +3869,6 @@ jsonPathGetLeaf(uchar *name, int lenName)
if(name[i] == '!')
break;
}
-dbgprintf("DDDD: jsonPAthGetLeaf: name '%s', lenNAme %d, i %d\n", name, lenName, i);
if(name[i] == '!' || name[i] == '.' || name[i] == '/')
++i;
return name + i;
@@ -4207,7 +4211,6 @@ msgPropDescrFill(msgPropDescr_t *pProp, uchar *name, int nameLen)
/* we patch the root name, so that support functions do not need to
* check for different root chars. */
pProp->name[0] = '!';
-dbgprintf("DDDD: setting porpname '%s' (offs %d)\n", pProp->name, offs);
}
pProp->id = id;
finalize_it: