Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Lots of pedantic error checking in Palacios proper, especially for memory
[palacios.git] / palacios / src / palacios / vmm_multitree.c
index 309d1a0..c448e62 100644 (file)
@@ -59,8 +59,14 @@ struct v3_mtree * v3_mtree_create_node(struct v3_mtree * root, char * name) {
 
     PrintDebug("Creating Node %s\n", name);
 
+
+    if (!node) {
+       PrintError("Cannot allocate multitree node\n");
+       return NULL;
+    }
+
     memset(node, 0, sizeof(struct v3_mtree));
-    strncpy(node->name, name, 50);
+    strncpy(node->name, name, V3_MTREE_NAME_LEN);
 
     if ((ret = __insert_mtree_node(root, node))) {
        PrintError("Insertion failure\n");