summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Abraham <tabraham@suse.com>2020-09-24 14:52:33 -0400
committerKarel Zak <kzak@redhat.com>2020-11-13 12:04:02 +0100
commitcb4d39ff41ea8bcfc7ec2b36db68c72f8c21c3c9 (patch)
treefeefaa1e6947a282eda287838a6ae2f7201e7a47
parent1cf30a85af60b8b55b5edaa2e056b5871bf21a4a (diff)
downloadutil-linux-cb4d39ff41ea8bcfc7ec2b36db68c72f8c21c3c9.tar.gz
lscpu: avoid segfault on PowerPC systems with valid hardware configurations
ntypes greater than 1 is valid in some hardware configurations, and an assert() on the value isn't necessary or very future proof
-rw-r--r--sys-utils/lscpu.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index ca085b665..90c475a1f 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -440,8 +440,6 @@ static void read_physical_info_powerpc(struct lscpu_desc *desc)
return;
ntypes = strbe16toh(buf, 2);
-
- assert(ntypes <= 1);
if (!ntypes)
return;