summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-02-25 05:25:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:54 -0500
commitc9b766a9af70ac7e94f7ebf872fa5b9e21220d12 (patch)
treefe50a7e7f8b882ed47b146f389e059df3a885788 /source4
parent7fc5f4a6f7bd7a0b5c66b019377ba4ad1bc110bb (diff)
downloadsamba-c9b766a9af70ac7e94f7ebf872fa5b9e21220d12.tar.gz
samba-c9b766a9af70ac7e94f7ebf872fa5b9e21220d12.tar.bz2
samba-c9b766a9af70ac7e94f7ebf872fa5b9e21220d12.zip
r5551: Protect against falling off the end of the name resolve order list
if a name is not found. (This used to be commit c23f767a9f5dd2dcae31bded540263b08876ecc2)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/resolve/resolve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c
index 7e3f78edb4..82268dc953 100644
--- a/source4/libcli/resolve/resolve.c
+++ b/source4/libcli/resolve/resolve.c
@@ -101,7 +101,7 @@ static struct composite_context *setup_next_method(struct composite_context *c)
if (method) {
req = method->send_fn(&state->name, c->event_ctx);
}
- if (req == NULL) state->methods++;
+ if (req == NULL && state->methods[0]) state->methods++;
} while (!req && state->methods[0]);
if (req) {