]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
grab the interface name from tok and not from the uninitialized array
authorRonnie Sahlberg <sahlberg@ronnie>
Mon, 10 Sep 2007 06:34:11 +0000 (16:34 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Mon, 10 Sep 2007 06:34:11 +0000 (16:34 +1000)
(This used to be ctdb commit 23a47ca2331a163b5fde03bd2f6f1d478633aede)

ctdb/server/ctdb_takeover.c

index 781bfaf32406af6ee3ddc469af8ff8d2ee4ab3c9..f9b809591aefc20e3cece2bd3c65b3e8d3717162 100644 (file)
@@ -457,7 +457,6 @@ int ctdb_set_public_addresses(struct ctdb_context *ctdb, const char *alist)
        for (i=0;i<nlines;i++) {
                unsigned mask;
                struct sockaddr_in addr;
-               char ifacebuf[100];
                const char *iface;
                char *tok;
 
@@ -477,7 +476,7 @@ int ctdb_set_public_addresses(struct ctdb_context *ctdb, const char *alist)
                        }
                        iface = ctdb->default_public_interface;
                } else {
-                       iface = ifacebuf;
+                       iface = tok;
                }
 
                if (add_public_address(ctdb, addr, mask, iface)) {