summaryrefslogtreecommitdiffstats
path: root/obj.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-04 12:03:45 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-04 12:03:45 +0000
commit8c04e4ef36524aab6281bcecc4cac171e718a426 (patch)
treef8af99d43d75e32d82837899a751e8e747115a60 /obj.c
parentf5250a3a92ec4c1738556f3cc5139dbc15579add (diff)
downloadrsyslog-8c04e4ef36524aab6281bcecc4cac171e718a426.tar.gz
rsyslog-8c04e4ef36524aab6281bcecc4cac171e718a426.tar.xz
rsyslog-8c04e4ef36524aab6281bcecc4cac171e718a426.zip
bugfix: zero-length strings were not supported in object deserializer
Diffstat (limited to 'obj.c')
-rw-r--r--obj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/obj.c b/obj.c
index 51c7c9df..3485803d 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));