summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_ds.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-09-29 06:17:09 +0000
committerTim Potter <tpot@samba.org>2003-09-29 06:17:09 +0000
commit5400952f7f74d6e656fcf4ded173868ecec3cb77 (patch)
tree24ac373cfcffe454faaac14ffd7c8f572d7c2c63 /source3/rpc_parse/parse_ds.c
parent64dbd7cbff3fa7a4e560571ec38207a7176e4646 (diff)
downloadsamba-5400952f7f74d6e656fcf4ded173868ecec3cb77.tar.gz
samba-5400952f7f74d6e656fcf4ded173868ecec3cb77.tar.bz2
samba-5400952f7f74d6e656fcf4ded173868ecec3cb77.zip
Merge from 3.0:
>Fix for #480. Change the interface for init_unistr2 to not take a length >but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string. >This is not the case. Count it after conversion. >Jeremy. (This used to be commit e2ab9e54cd0ec0002175cf18ff364f4aebaf85a0)
Diffstat (limited to 'source3/rpc_parse/parse_ds.c')
-rw-r--r--source3/rpc_parse/parse_ds.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source3/rpc_parse/parse_ds.c b/source3/rpc_parse/parse_ds.c
index f954806036..26dcdb34b8 100644
--- a/source3/rpc_parse/parse_ds.c
+++ b/source3/rpc_parse/parse_ds.c
@@ -138,8 +138,6 @@ BOOL ds_io_r_getprimdominfo( const char *desc, prs_struct *ps, int depth, DS_R_G
BOOL init_q_ds_enum_domain_trusts( DS_Q_ENUM_DOM_TRUSTS *q, const char *server,
uint32 flags )
{
- int len;
-
q->flags = flags;
if ( server && *server )
@@ -147,9 +145,7 @@ BOOL init_q_ds_enum_domain_trusts( DS_Q_ENUM_DOM_TRUSTS *q, const char *server,
else
q->server_ptr = 0;
- len = q->server_ptr ? strlen(server)+1 : 0;
-
- init_unistr2( &q->server, server, len );
+ init_unistr2( &q->server, server, UNI_STR_TERMINATE);
return True;
}