Skip to content

Commit

Permalink
Fix segfault in "mcelog --help"
Browse files Browse the repository at this point in the history
The cpu_choices list in mcelog.c needs some kind of NULL entry at
the end to prevent the loops that iterate through all the entries
from falling off the end.  The loops look for NULL, not the size
of the array.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
  • Loading branch information
Sidik Isani authored and Andi Kleen committed Dec 20, 2014
1 parent 9bfaad8 commit 9823b63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mcelog.c
Expand Up @@ -273,6 +273,7 @@ static struct config_choice cpu_choices[] = {
{ "broadwell", CPU_BROADWELL },
{ "xeon-v2", CPU_IVY_BRIDGE_EPEX },
{ "xeon-v3", CPU_HASWELL_EPEX },
{ NULL }
};

static void print_cputypes(void)
Expand Down

0 comments on commit 9823b63

Please sign in to comment.