summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/patches/03-json-nul-terminator.patch11
-rw-r--r--debian/patches/series1
2 files changed, 12 insertions, 0 deletions
diff --git a/debian/patches/03-json-nul-terminator.patch b/debian/patches/03-json-nul-terminator.patch
new file mode 100644
index 0000000..783a555
--- /dev/null
+++ b/debian/patches/03-json-nul-terminator.patch
@@ -0,0 +1,11 @@
+--- a/template.c
++++ b/template.c
+@@ -361,7 +361,7 @@ tplToJSON(struct template *pTpl, msg_t *pMsg, struct json_object **pjson, struct
+ pTpe->data.field.propName, &propLen,
+ &bMustBeFreed, ttNow);
+ if(pTpe->data.field.options.bMandatory || propLen > 0) {
+- jsonf = json_object_new_string_len((char*)pVal, propLen);
++ jsonf = json_object_new_string_len((char*)pVal, propLen+1);
+ json_object_object_add(json, (char*)pTpe->fieldName, jsonf);
+ }
+ if(bMustBeFreed) { /* json-c makes its own private copy! */
diff --git a/debian/patches/series b/debian/patches/series
index eeb8ce3..21a3cf2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
# Debian patches for rsyslog
01-dont_create_db.patch
02-mongo-template-not-mandatory.patch
+03-json-nul-terminator.patch