X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-code-inject.c;h=34c3e6ae292f190e55f9a1885dc648d5692876cb;hb=d22c11cec4e8c3390bfe6bf16ed07f5d073f0d4a;hp=1add90897525980754b8764ff4d4bf5a9066695b;hpb=0b2115047303e779be8578e9802cfa55d1767c7b;p=palacios.git diff --git a/linux_module/iface-code-inject.c b/linux_module/iface-code-inject.c index 1add908..34c3e6a 100644 --- a/linux_module/iface-code-inject.c +++ b/linux_module/iface-code-inject.c @@ -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); } @@ -135,6 +136,7 @@ static int guest_init_code_inject (struct v3_guest * guest, void ** vm_data) { static int guest_deinit_code_inject (struct v3_guest * guest, void * vm_data) { free_inject_data(); + remove_guest_ctrl(guest, V3_VM_TOPHALF_INJECT); return 0; }