Don't assume zeroed cpuid_model[] fields. This doesn't break anything yet but QOM properties should be able to set the value to something else without setting an intermediate zero string.
Signed-off-by: Andreas Färber <afaer...@suse.de> Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> --- target-i386/cpu.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 3df53ca..80c1ca5 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -627,6 +627,9 @@ static void x86_cpuid_set_model_id(CPUX86State *env, const char *model_id) model_id = ""; } len = strlen(model_id); + for (i = 0; i < 12; i++) { + env->cpuid_model[i] = 0; + } for (i = 0; i < 48; i++) { if (i >= len) { c = '\0'; -- 1.7.7