]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lscpu: add more sanity checks for dmi_decode_cputype()
authorHuang Shijie <shijie@os.amperecomputing.com>
Fri, 18 Jun 2021 12:46:32 +0000 (12:46 +0000)
committerKarel Zak <kzak@redhat.com>
Fri, 18 Jun 2021 15:51:11 +0000 (17:51 +0200)
commitb366e69b8290bb2e588c45a4ee6907b8f4a198d6
tree46fd818ca673fef0e2e7cdc8d14d6bff218cf468
parent6eb184299eb9fc095e1b34899e71da13e16e3ce2
lscpu: add more sanity checks for dmi_decode_cputype()

After tested on different platforms, we found dmi_string() may return NULL
in some case.

So add more sanity checks for dmi_decode_cputype().

Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
sys-utils/lscpu-dmi.c