X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fide.c;h=bc42ea8e82841a04dc9f3f613e9fe05200358098;hp=e9a0dd1672607f99d36f2a72fb17ae66089979da;hb=d22c11cec4e8c3390bfe6bf16ed07f5d073f0d4a;hpb=f240f8a3c11478abe180bd906c746c68eb8c3a3c diff --git a/palacios/src/devices/ide.c b/palacios/src/devices/ide.c index e9a0dd1..bc42ea8 100644 --- a/palacios/src/devices/ide.c +++ b/palacios/src/devices/ide.c @@ -1990,7 +1990,8 @@ static int connect_fn(struct v3_vm_info * vm, } if (model_str != NULL) { - strncpy(drive->model, model_str, sizeof(drive->model) - 1); + strncpy(drive->model, model_str, sizeof(drive->model)); + drive->model[sizeof(drive->model)-1] = 0; } if (strcasecmp(type_str, "cdrom") == 0) {