Skip to content
Commit e20f6702 authored by Borislav Petkov's avatar Borislav Petkov
Browse files

tools/x86/kcpuid: Check last token too



Input lines like

  0x8000001E,     0, EAX,   31:0, Extended APIC ID

where the short name is missing lead to a segfault because the loop
takes the long name for the short name and tokens[5] becomes NULL which
explodes later in strcpy().

Check its value too before further processing.

Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarFeng Tang <feng.tang@intel.com>
Link: https://lkml.kernel.org/r/20210315125901.30315-1-bp@alien8.de
parent f706bb59
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment