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] / linux_module / iface-code-inject.c
index 1262d77..34c3e6a 100644 (file)
@@ -74,7 +74,8 @@ static int vm_tophalf_inject (struct v3_guest * guest, unsigned int cmd, unsigne
 
     /* we have a binary name */
     if (top_arg.is_exec_hooked) {
-        strcpy(top->bin_file, top_arg.bin_file);
+        strncpy(top->bin_file, top_arg.bin_file,256);
+       top->bin_file[255] = 0;
         top->is_exec_hooked = 1;
         DEBUG("top->bin_file is %s\n", top->bin_file);
     }