r8246: Don't try and set the element after the end off the array to NULL.
authorAndrew Bartlett <abartlet@samba.org>
Sat, 9 Jul 2005 01:53:45 +0000 (01:53 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:19:25 +0000 (13:19 -0500)
Andrew Bartlett

source/libnet/libnet.c

index 963e8244974b5ae7f0c9293049c3d26164a06e62..604a2aaca45deb8a8d10648a4716e65d998e3a62 100644 (file)
@@ -54,7 +54,7 @@ struct libnet_context *libnet_context_init(struct event_context *ev)
        for (nr_i = 0; nr_i < nr_count; nr_i++) {
                ctx->name_res_methods[nr_i] = talloc_strdup(ctx, nr_methods[nr_i]);
        }
-       ctx->name_res_methods[nr_count+1] = NULL;
+       ctx->name_res_methods[nr_i] = NULL;
        
        return ctx;
 }