From 14f83ff83589e8f43cbd47a4115c2e9afcf4d5cb Mon Sep 17 00:00:00 2001 From: Swen Schillig Date: Fri, 26 Jan 2018 13:28:58 +0100 Subject: [PATCH] Zero libnet_LookupName out struct before using Zero libnet_LookupName out struct before setting results, preventing false result interpretation. Signed-off-by: Swen Schillig Reviewed-by: Ralph Boehme Reviewed-by: Christof Schmitt --- source4/libnet/libnet_lookup.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c index bdb99950493..a8d41f45335 100644 --- a/source4/libnet/libnet_lookup.c +++ b/source4/libnet/libnet_lookup.c @@ -384,14 +384,11 @@ NTSTATUS libnet_LookupName_recv(struct composite_context *c, TALLOC_CTX *mem_ctx struct lookup_name_state *s; status = composite_wait(c); + ZERO_STRUCT(io->out); if (NT_STATUS_IS_OK(status)) { s = talloc_get_type(c->private_data, struct lookup_name_state); - io->out.rid = 0; - io->out.sid = NULL; - io->out.sidstr = NULL; - if (*s->lookup.out.count > 0) { struct lsa_RefDomainList *domains = *s->lookup.out.domains; struct lsa_TransSidArray *sids = s->lookup.out.sids; -- 2.34.1