biosdevname/dmidecode-prevent-infinite-recursion.patch

14 lines
499 B
Diff

Index: biosdevname-0.7.3/src/dmidecode/dmidecode.c
===================================================================
--- biosdevname-0.7.3.orig/src/dmidecode/dmidecode.c
+++ biosdevname-0.7.3/src/dmidecode/dmidecode.c
@@ -153,7 +153,7 @@ void smbios_setslot(const struct libbios
}
/* 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);
}
}