]> 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 11:04:02 +0000 (12:04 +0100)
ntypes greater than 1 is valid in some hardware configurations, and an assert()
on the value isn't necessary or very future proof

sys-utils/lscpu.c

index ca085b665aa896885dbfe92d3cf9f3935a41f301..90c475a1f47adaa4913796075f6ddf46f90e28bb 100644 (file)
@@ -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;