summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-12-10 21:13:44 +0000
committerGerald Carter <jerry@samba.org>2003-12-10 21:13:44 +0000
commitae8d35b2a2cead8a21a7c4f4bfbefa830384470e (patch)
tree8807d430c524dbe96bf642acce0f24352179ee7f /source3/rpc_parse
parent87fddf6a988dfcdb3f1d3a715df585b6c6efa9d7 (diff)
downloadsamba-ae8d35b2a2cead8a21a7c4f4bfbefa830384470e.tar.gz
samba-ae8d35b2a2cead8a21a7c4f4bfbefa830384470e.tar.bz2
samba-ae8d35b2a2cead8a21a7c4f4bfbefa830384470e.zip
Fix UNISTR2 length bug in LsaQueryInfo(3) that cause SID resolution to fail on local files on on domain members; bug 875
(This used to be commit c6594e35573186966a4d57404f1c06b98670db06)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index afdf0fc4c9..976ba20681 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -914,7 +914,7 @@ void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags)
str->uni_max_len = num_chars;
str->offset = 0;
str->uni_str_len = num_chars;
- if (num_chars && (flags == UNI_MAXLEN_TERMINATE))
+ if ( num_chars && ((flags == UNI_MAXLEN_TERMINATE) || (flags == UNI_BROKEN_NON_NULL)) )
str->uni_max_len++;
}