aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-03-25 12:59:00 +0100
committerErwan Velu <erwan.velu@free.fr>2009-03-26 18:27:36 +0100
commit58f1cd5a3f42c663099015359a00135002b584e2 (patch)
tree97334e71717b2edbfa9b981e7ddb28ca3b87a881
parent35d759421e4a31e152acc1dcb6bae057b3308c93 (diff)
downloadsyslinux.git-58f1cd5a3f42c663099015359a00135002b584e2.tar.gz
syslinux.git-58f1cd5a3f42c663099015359a00135002b584e2.tar.xz
syslinux.git-58f1cd5a3f42c663099015359a00135002b584e2.zip
hdt: Pxe mode might generate corruption
Impact: Prevent some hard lock due to pxe detection In some cases, we can't find the associated PCI device. In such situation, we shouldn't try to display its properties as pci_device is set to NULL.
-rw-r--r--com32/hdt/hdt-cli-pxe.c2
-rw-r--r--com32/hdt/hdt-menu-pxe.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/com32/hdt/hdt-cli-pxe.c b/com32/hdt/hdt-cli-pxe.c
index 772c0dfd..5c556645 100644
--- a/com32/hdt/hdt-cli-pxe.c
+++ b/com32/hdt/hdt-cli-pxe.c
@@ -55,7 +55,7 @@ void main_show_pxe(struct s_hardware *hardware)
struct s_pxe *p = &hardware->pxe;
more_printf(" PCI device no: %d \n", p->pci_device_pos);
- if (hardware->pci_ids_return_code == -ENOPCIIDS) {
+ if ((hardware->pci_ids_return_code == -ENOPCIIDS) || (p->pci_device==NULL)) {
snprintf(buffer, sizeof(buffer),
" PCI ID : %04x:%04x[%04x:%04X] rev(%02x)\n",
p->vendor_id, p->product_id, p->subvendor_id,
diff --git a/com32/hdt/hdt-menu-pxe.c b/com32/hdt/hdt-menu-pxe.c
index 686117ab..497fa776 100644
--- a/com32/hdt/hdt-menu-pxe.c
+++ b/com32/hdt/hdt-menu-pxe.c
@@ -43,7 +43,7 @@ void compute_PXE(struct s_my_menu *menu, struct s_hardware *hardware)
struct s_pxe *p = &hardware->pxe;
- if (hardware->pci_ids_return_code == -ENOPCIIDS) {
+ if ((hardware->pci_ids_return_code == -ENOPCIIDS) || (p->pci_device==NULL)) {
snprintf(buffer, sizeof buffer, "PCI Vendor : %d",
p->vendor_id);
snprintf(infobar, sizeof infobar, "PCI Vendor : %d",