Commit
2d60ad8e terminated the cpu id string at 12 chars,
but the output from cpuid is 12 chars. So we need one more
character, if we want it null terminated and strcmp()
working.
Signed-off-by: Jens Axboe <axboe@fb.com>
static inline int arch_init(char *envp[])
{
unsigned int level;
- char str[12];
+ char str[13];
cpuid(0, &level, (unsigned int *) &str[0],
(unsigned int *) &str[8],
(unsigned int *) &str[4]);
- str[11] = '\0';
+ str[12] = '\0';
if (!strcmp(str, "GenuineIntel"))
tsc_reliable = arch_init_intel(level);
else if (!strcmp(str, "AuthenticAMD"))