r5551: Protect against falling off the end of the name resolve order list
authorTim Potter <tpot@samba.org>
Fri, 25 Feb 2005 05:25:17 +0000 (05:25 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:10:54 +0000 (13:10 -0500)
if a name is not found.
(This used to be commit c23f767a9f5dd2dcae31bded540263b08876ecc2)

source4/libcli/resolve/resolve.c

index 7e3f78edb4a9211d01580a7dd96d58dce37baf9a..82268dc953e3b64eb0f60cdd09a2b34429cfe366 100644 (file)
@@ -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) {