mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
ctdb-tools: Fix memory corruption in "ctdb ip -v"
First argument to talloc_asprintf_append() is the string being appended to, not a talloc context. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12470 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
7bcef2f0e2
commit
acaa4407ca
@ -1445,7 +1445,7 @@ static void print_ip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
|
||||
conf = talloc_strdup(mem_ctx, iface->name);
|
||||
} else {
|
||||
conf = talloc_asprintf_append(
|
||||
mem_ctx, ",%s", iface->name);
|
||||
conf, ",%s", iface->name);
|
||||
}
|
||||
|
||||
if (ipinfo[i]->active_idx == j) {
|
||||
@ -1460,7 +1460,7 @@ static void print_ip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
|
||||
avail = talloc_strdup(mem_ctx, iface->name);
|
||||
} else {
|
||||
avail = talloc_asprintf_append(
|
||||
mem_ctx, ",%s", iface->name);
|
||||
avail, ",%s", iface->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user