cpuid: Null terminate x86 CPU string.
authorSitsofe Wheeler <sitsofe@yahoo.com>
Thu, 13 Feb 2014 06:07:52 +0000 (06:07 +0000)
committerJens Axboe <axboe@fb.com>
Thu, 13 Feb 2014 16:09:00 +0000 (09:09 -0700)
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
arch/arch-x86-common.h

index 179572d482fa550093084b55b5bd2b3d0f75c291..26a14a82375001a24cbe4b3c7466c7e580138518 100644 (file)
@@ -60,6 +60,7 @@ static inline int arch_init(char *envp[])
                         (unsigned int *) &str[8],
                         (unsigned int *) &str[4]);
 
+       str[11] = '\0';
        if (!strcmp(str, "GenuineIntel"))
                tsc_reliable = arch_init_intel(level);
        else if (!strcmp(str, "AuthenticAMD"))