diff options
author | Daniel Pocock <daniel@pocock.pro> | 2014-03-06 08:46:23 +0000 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2014-03-11 19:04:46 +0100 |
commit | bcf0fecfe65c7bcf034de15905f85b93f26e5839 (patch) | |
tree | 82def4d8af60437dfdf5ca507e48338e516e0ac7 /debian | |
parent | 4b4f8969548bc1589f60dd6494ca094bd9378044 (diff) | |
download | rsyslog-bcf0fecfe65c7bcf034de15905f85b93f26e5839.tar.gz |
Ensure JSON templates are NUL terminated (upstream 9d0fc675a51125acde057d0e53e8323c5e1ed572)
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/03-json-nul-terminator.patch | 11 | ||||
-rw-r--r-- | debian/patches/series | 1 |
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 |