]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: avoid segfault on PowerPC systems with valid hardware configurations
authorThomas Abraham <tabraham@suse.com>
Thu, 24 Sep 2020 18:52:33 +0000 (14:52 -0400)
committerKarel Zak <kzak@redhat.com>
Fri, 13 Nov 2020 08:19:02 +0000 (09:19 +0100)
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 <kzak@redhat.com>
sys-utils/lscpu-cputype.c

index b71f57169783c1740a8d064ceff3b5fcf8071876..ec89b3c09f504d072b8e52d0d0a01500d8536440 100644 (file)
@@ -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;