From 91e02eb209a6571429a00fa71854709dfc18ac99 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 4 Apr 2008 12:05:28 +0000 Subject: bugfix: zero-length strings were not supported in object deserializer --- obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'obj.c') 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)); -- cgit