summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-04 12:04:54 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-04 12:04:54 +0000
commitcd9762ddae5e0350ede5431c88346690799a688e (patch)
tree14dae2715bf09b56b58fc0ff84b06803da4e08fa
parent10da14f1a80b83feaf048c7bfa608f680a6b11d4 (diff)
downloadrsyslog-cd9762ddae5e0350ede5431c88346690799a688e.tar.gz
rsyslog-cd9762ddae5e0350ede5431c88346690799a688e.tar.xz
rsyslog-cd9762ddae5e0350ede5431c88346690799a688e.zip
bugfix: zero-length strings were not supported in object deserializer
-rw-r--r--ChangeLog2
-rw-r--r--obj.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 92585e19..9320fcbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@ Version 3.14.0 (rgerhards), 2008-04-04
- bugfix: rsyslogd was no longer build by default; man pages are
only installed if corresponding option is selected. Thanks to
Michael Biebl for pointing these problems out.
+- bugfix: zero-length strings were not supported in object
+ deserializer
- disabled atomic operations for this stable build as it caused
platform problems
- bugfix: memory leaks in script engine
diff --git a/obj.c b/obj.c
index d408c4bb..2f16669a 100644
--- a/obj.c
+++ b/obj.c
@@ -495,7 +495,7 @@ finalize_it:
}
-/* de-serialize a string, length must be provided */
+/* de-serialize a string, length must be provided but may be 0 */
static rsRetVal objDeserializeStr(cstr_t **ppCStr, int iLen, strm_t *pStrm)
{
DEFiRet;
@@ -504,7 +504,7 @@ static rsRetVal objDeserializeStr(cstr_t **ppCStr, int iLen, strm_t *pStrm)
cstr_t *pCStr = NULL;
assert(ppCStr != NULL);
- assert(iLen > 0);
+ assert(iLen >= 0);
CHKiRet(rsCStrConstruct(&pCStr));