diff options
author | Andreas Färber <afaerber@suse.de> | 2012-04-24 16:22:31 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-04-26 13:14:57 -0500 |
commit | 4ed5f5ea4598fd4ceb44b205ba051173db08adf9 (patch) | |
tree | 44ca5f56e3f5ff5b2266071d2721f452d8dc0e00 | |
parent | ea7697fcd6edda2e0e54a02653e045003970bfbe (diff) |
target-i386: Fix x86_cpuid_set_model_id()
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 <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | target-i386/cpu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 3df53ca74b..e1517e65c6 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -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'; |