opengnsys_ipxe/src/hci
Michael Brown 56b30364c5 [pci] Check for wraparound in callers of pci_find_next()
The semantics of the bus:dev.fn parameter passed to pci_find_next()
are "find the first existent PCI device at this address or higher",
with the caller expected to increment the address between finding
devices.  This does not allow the parameter to distinguish between the
two cases "start from address zero" and "wrapped after incrementing
maximal possible address", which could therefore lead to an infinite
loop in the degenerate case that a device with address ffff:ff:1f.7
really exists.

Fix by checking for wraparound in the caller (which is already
responsible for performing the increment).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2022-09-15 15:20:58 +01:00
..
commands [pci] Check for wraparound in callers of pci_find_next() 2022-09-15 15:20:58 +01:00
keymap [console] Include mappings for AltGr-Shift-<key> 2022-02-16 15:31:47 +00:00
mucurses [mucurses] Avoid potential division by zero 2017-07-04 12:51:53 +01:00
tui [settings] Use generic jump scrolling abstraction 2015-03-03 03:51:08 +00:00
editstring.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00
jumpscroll.c [menu] Abstract out the generic concept of a jump scroller 2015-03-03 02:47:37 +00:00
linux_args.c [linux] Use host glibc system call wrappers 2021-02-28 23:28:23 +00:00
readline.c [readline] Extend maximum read line length to 1024 characters 2021-09-10 15:51:14 +01:00
shell.c [readline] Add an optional timeout to readline_history() 2021-04-23 12:27:57 +01:00
strerror.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
wireless_errors.c [legal] Update FSF mailing address in GPL licence texts 2012-07-20 19:55:45 +01:00