we allocated one byte too little in the blob we need to send as the control to the...
authorRonnie Sahlberg <sahlberg@samba.org>
Thu, 3 Apr 2008 05:35:23 +0000 (16:35 +1100)
committerRonnie Sahlberg <sahlberg@samba.org>
Thu, 3 Apr 2008 05:35:23 +0000 (16:35 +1100)
tools/ctdb.c

index df4b703a786e32d1cae26fbaf47fc57c9df8fdad..397e67a608bcf6c800dbf2ef433be7a8299bcb6b 100644 (file)
@@ -524,7 +524,7 @@ static int control_addip(struct ctdb_context *ctdb, int argc, const char **argv)
                return -1;
        }
 
-       len = offsetof(struct ctdb_control_ip_iface, iface) + strlen(argv[1]);
+       len = offsetof(struct ctdb_control_ip_iface, iface) + strlen(argv[1]) + 1;
        pub = talloc_size(ctdb, len); 
        CTDB_NO_MEMORY(ctdb, pub);