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.


Cleanup and sanity-checking of use of strncpy/strcpy (Coverity static analysis)
[palacios.git] / palacios / src / devices / pci_front.c
index 08d03fe..868a3ab 100644 (file)
@@ -1019,6 +1019,7 @@ static int pci_front_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg)
     
     state->pci_bus = bus;
     strncpy(state->name, dev_id, 32);
+    state->name[31] = 0;
     
     if (!(dev = v3_add_device(vm, dev_id, &dev_ops, state))) { 
        PrintError(vm, VCORE_NONE, "pci_front (%s): unable to add device\n",state->name);