30 lines
915 B
Diff
30 lines
915 B
Diff
|
From d6fa84f8a80d5e1c526fe675c345f709a700e33e Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Josef=20M=C3=B6llers?= <josef.moellers@suse.com>
|
||
|
Date: Fri, 20 Jul 2018 08:56:48 +0200
|
||
|
Subject: [PATCH] Prevent infinite recursion in dmidecode.c::smbios_setslot by
|
||
|
(#7)
|
||
|
|
||
|
Checking that subordinate bus has a number greater than the
|
||
|
current bus.
|
||
|
Fixes SUSE bug#1093625
|
||
|
---
|
||
|
src/dmidecode/dmidecode.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/dmidecode/dmidecode.c b/src/dmidecode/dmidecode.c
|
||
|
index 1d805bb..a01a6ce 100644
|
||
|
--- a/src/dmidecode/dmidecode.c
|
||
|
+++ b/src/dmidecode/dmidecode.c
|
||
|
@@ -153,7 +153,7 @@ void smbios_setslot(const struct libbiosdevname_state *state,
|
||
|
}
|
||
|
|
||
|
/* Found a PDEV, now is it a bridge? */
|
||
|
- if (pdev->sbus != -1) {
|
||
|
+ if (pdev->sbus != -1 && pdev->sbus > bus) {
|
||
|
smbios_setslot(state, domain, pdev->sbus, -1, -1, type, slot, index, label);
|
||
|
}
|
||
|
}
|
||
|
--
|
||
|
2.44.0
|
||
|
|