From 80fcd2c802b5ae572bc844c996891c9d00bef080 Mon Sep 17 00:00:00 2001 From: Thomas Abraham Date: Thu, 24 Sep 2020 14:52:33 -0400 Subject: [PATCH] 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 [kzak@redhat.com: - port this patch to new code] Signed-off-by: Karel Zak --- sys-utils/lscpu-cputype.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-utils/lscpu-cputype.c b/sys-utils/lscpu-cputype.c index b71f571697..ec89b3c09f 100644 --- a/sys-utils/lscpu-cputype.c +++ b/sys-utils/lscpu-cputype.c @@ -714,7 +714,6 @@ int lscpu_read_archext(struct lscpu_cxt *cxt) goto nortas; ntypes = strbe16toh(buf, 2); - assert(ntypes <= 1); if (!ntypes) goto nortas; -- 2.47.3