summaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/virt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 0c65fe38a0..371147f3ae 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2173,7 +2173,7 @@ static void virt_set_oem_id(Object *obj, const char *value, Error **errp)
return;
}
- strncpy(vms->oem_id, value, len + 1);
+ strncpy(vms->oem_id, value, 6);
}
static char *virt_get_oem_table_id(Object *obj, Error **errp)
@@ -2194,7 +2194,7 @@ static void virt_set_oem_table_id(Object *obj, const char *value,
"User specified oem-table-id value is bigger than 8 bytes in size");
return;
}
- strncpy(vms->oem_table_id, value, len + 1);
+ strncpy(vms->oem_table_id, value, 8);
}