]> Git Repo - qemu.git/commitdiff
target-i386: Fix x86_cpuid_set_model_id()
authorAndreas Färber <[email protected]>
Tue, 24 Apr 2012 14:22:31 +0000 (16:22 +0200)
committerAnthony Liguori <[email protected]>
Thu, 26 Apr 2012 18:14:57 +0000 (13:14 -0500)
Don't assume zeroed cpuid_model[] fields.

This didn'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 <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
target-i386/cpu.c

index 3df53ca74b2f32b02ab9025f67c06b359495ad6a..e1517e65c6014fe8dbb29200c49c0a53c1f6947c 100644 (file)
@@ -627,6 +627,7 @@ static void x86_cpuid_set_model_id(CPUX86State *env, const char *model_id)
         model_id = "";
     }
     len = strlen(model_id);
+    memset(env->cpuid_model, 0, 48);
     for (i = 0; i < 48; i++) {
         if (i >= len) {
             c = '\0';
This page took 0.026216 seconds and 4 git commands to generate.