summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_prs.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-02 19:29:02 +0000
committerJeremy Allison <jra@samba.org>2001-03-02 19:29:02 +0000
commite9f555e4bd0c778e40f9661562806fb52dc421d9 (patch)
tree4b8dfd54ae78b071b1b037953cde3b7b2ecae18d /source3/rpc_parse/parse_prs.c
parent28c43a3cd50e2504f814d864f6423b5df4dc8d45 (diff)
downloadsamba-e9f555e4bd0c778e40f9661562806fb52dc421d9.tar.gz
samba-e9f555e4bd0c778e40f9661562806fb52dc421d9.tar.bz2
samba-e9f555e4bd0c778e40f9661562806fb52dc421d9.zip
Merged JF's fixes into HEAD. These are for string parsing and SAMR fixes.
Jeremy. (This used to be commit c3a1904564175a7a5cf71e88540b96f7daa59730)
Diffstat (limited to 'source3/rpc_parse/parse_prs.c')
-rw-r--r--source3/rpc_parse/parse_prs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 56d03daf18..1ec3f72d4c 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -673,16 +673,16 @@ BOOL prs_unistr2(BOOL charmode, char *name, prs_struct *ps, int depth, UNISTR2 *
if (q == NULL)
return False;
+ /* If the string is empty, we don't have anything to stream */
+ if (str->uni_str_len==0)
+ return True;
+
if (UNMARSHALLING(ps)) {
str->buffer = (uint16 *)prs_alloc_mem(ps,str->uni_max_len * sizeof(uint16));
if (str->buffer == NULL)
return False;
}
- /* If the string is empty, we don't have anything to stream */
- if (str->uni_str_len==0)
- return True;
-
p = (char *)str->buffer;
/* If we're using big-endian, reverse to get little-endian. */