dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone

Blame SOURCES/0047-lscpu-avoid-segfault-on-PowerPC-systems-with-valid-h.patch

df3f53
From 4ac8e70822313b0c6b35ebf633c6e8fbca558998 Mon Sep 17 00:00:00 2001
df3f53
From: Thomas Abraham <tabraham@suse.com>
df3f53
Date: Thu, 24 Sep 2020 14:52:33 -0400
df3f53
Subject: [PATCH 47/55] lscpu: avoid segfault on PowerPC systems with valid
df3f53
 hardware configurations
df3f53
df3f53
ntypes greater than 1 is valid in some hardware configurations, and an assert()
df3f53
on the value isn't necessary or very future proof
df3f53
df3f53
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1883783
df3f53
Upstream: http://github.com/karelzak/util-linux/commit/cbe3304bc43b3fceb06fb6e5dd822bb59abf1b84
df3f53
Signed-off-by: Karel Zak <kzak@redhat.com>
df3f53
---
df3f53
 sys-utils/lscpu.c | 2 --
df3f53
 1 file changed, 2 deletions(-)
df3f53
df3f53
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
df3f53
index 1aa7bff4d..748d545b6 100644
df3f53
--- a/sys-utils/lscpu.c
df3f53
+++ b/sys-utils/lscpu.c
df3f53
@@ -369,8 +369,6 @@ static void read_physical_info_powerpc(struct lscpu_desc *desc)
df3f53
 		return;
df3f53
 
df3f53
 	ntypes = strbe16toh(buf, 2);
df3f53
-
df3f53
-	assert(ntypes <= 1);
df3f53
 	if (!ntypes)
df3f53
 		return;
df3f53
 
df3f53
-- 
df3f53
2.29.2
df3f53