svn commit: samba r2547 - in branches/SAMBA_4_0/source/torture/rpc:
.
abartlet at samba.org
abartlet at samba.org
Thu Sep 23 00:10:41 GMT 2004
Author: abartlet
Date: 2004-09-23 00:10:40 +0000 (Thu, 23 Sep 2004)
New Revision: 2547
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/torture/rpc&rev=2547&nolog=1
Log:
Another place to use convert_string_talloc().
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/torture/rpc/samr.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/samr.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/samr.c 2004-09-23 00:01:16 UTC (rev 2546)
+++ branches/SAMBA_4_0/source/torture/rpc/samr.c 2004-09-23 00:10:40 UTC (rev 2547)
@@ -355,7 +355,7 @@
encode_pw_buffer(u.info24.password.data, newpass, STR_UNICODE);
/* w2k3 ignores this length */
- u.info24.pw_len = str_charnum(newpass)*2;
+ u.info24.pw_len = strlen_m(newpass) * 2;
status = dcerpc_fetch_session_key(p, &session_key);
if (!NT_STATUS_IS_OK(status)) {
@@ -2424,12 +2424,10 @@
/* Querydisplayinfo returns ascii -- convert */
- namelen = convert_string_allocate(CH_DISPLAY, CH_UNIX,
- q2.out.info.info5.entries[i].account_name.name,
- q2.out.info.info5.entries[i].account_name.name_len,
- (void **)&name);
- name = realloc(name, namelen+1);
- name[namelen] = 0;
+ namelen = convert_string_talloc(mem_ctx, CH_DISPLAY, CH_UNIX,
+ q2.out.info.info5.entries[i].account_name.name,
+ q2.out.info.info5.entries[i].account_name.name_len,
+ (void **)&name);
for (j=0; j<num_names; j++) {
if (names[j] == NULL)
More information about the samba-cvs
mailing list