From 352de700cadbb2c4e5b5e9ddc375e9de847e2193 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 Feb 2005 09:15:24 +0000 Subject: r5392: added "secure" WINS server processing. Send a WACK on name registrations from anyone who isn't a current owner, then query the owner addresses to see if they still want it. (This used to be commit 8dc2a028d3ca0115d3173df435d926d7b6a4d5d5) --- source4/libcli/nbt/namequery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/libcli') diff --git a/source4/libcli/nbt/namequery.c b/source4/libcli/nbt/namequery.c index a9748c7bd2..f222148f4d 100644 --- a/source4/libcli/nbt/namequery.c +++ b/source4/libcli/nbt/namequery.c @@ -98,7 +98,7 @@ NTSTATUS nbt_name_query_recv(struct nbt_name_request *req, io->out.name = packet->answers[0].name; io->out.num_addrs = packet->answers[0].rdata.netbios.length / 6; - io->out.reply_addrs = talloc_array(mem_ctx, const char *, io->out.num_addrs); + io->out.reply_addrs = talloc_array(mem_ctx, const char *, io->out.num_addrs+1); if (io->out.reply_addrs == NULL) { talloc_free(req); return NT_STATUS_NO_MEMORY; @@ -108,6 +108,7 @@ NTSTATUS nbt_name_query_recv(struct nbt_name_request *req, io->out.reply_addrs[i] = talloc_steal(mem_ctx, packet->answers[0].rdata.netbios.addresses[i].ipaddr); } + io->out.reply_addrs[i] = NULL; talloc_steal(mem_ctx, io->out.name.name); talloc_steal(mem_ctx, io->out.name.scope); -- cgit