summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt/namequery.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-14 09:15:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:50 -0500
commit352de700cadbb2c4e5b5e9ddc375e9de847e2193 (patch)
tree7e661123337c66bb78ee9490742bfd7d98f334e1 /source4/libcli/nbt/namequery.c
parent85fd954145ab9262d5e1930bb7a93d70663abe33 (diff)
downloadsamba-352de700cadbb2c4e5b5e9ddc375e9de847e2193.tar.gz
samba-352de700cadbb2c4e5b5e9ddc375e9de847e2193.tar.bz2
samba-352de700cadbb2c4e5b5e9ddc375e9de847e2193.zip
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)
Diffstat (limited to 'source4/libcli/nbt/namequery.c')
-rw-r--r--source4/libcli/nbt/namequery.c3
1 files changed, 2 insertions, 1 deletions
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);