From: Thomas Abraham Date: Thu, 24 Sep 2020 18:52:33 +0000 (-0400) Subject: lscpu: avoid segfault on PowerPC systems with valid hardware configurations X-Git-Tag: v2.37-rc1~299 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=80fcd2c802b5ae572bc844c996891c9d00bef080;p=thirdparty%2Futil-linux.git 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 --- 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;