mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r20570: use talloc_asprintf() instead of talloc_asprintf_append()
because talloc_asprintf_append() doesn't work like talloc_append_string() which uses strlen() on the old string instead of (tc->size - 1) This matter in this case because strlower_talloc() over allocates tridge: how should we fix this in lib/talloc/? metze
This commit is contained in:
parent
38ae9658cb
commit
1748af20b1
@ -2151,10 +2151,11 @@ struct composite_context *libnet_BecomeDC_send(struct libnet_context *ctx, TALLO
|
||||
/* Destination DSA dns_name construction */
|
||||
tmp_name = strlower_talloc(s, s->dest_dsa.netbios_name);
|
||||
if (composite_nomem(tmp_name, c)) return c;
|
||||
s->dest_dsa.dns_name = talloc_asprintf_append(tmp_name, ".%s",
|
||||
s->domain.dns_name);
|
||||
s->dest_dsa.dns_name = talloc_asprintf(s, "%s.%s",
|
||||
tmp_name,
|
||||
s->domain.dns_name);
|
||||
talloc_free(tmp_name);
|
||||
if (composite_nomem(s->dest_dsa.dns_name, c)) return c;
|
||||
|
||||
/* Callback function pointers */
|
||||
s->callbacks = r->in.callbacks;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user