HomeFreeBSD

Ensure we have a full EFI_DEVICE_PATH header before we try to look at

Description

Ensure we have a full EFI_DEVICE_PATH header before we try to look at
its length. Some BIOSes pad the length of the device path to an even
amount. When we had a device path that was somehow an odd length, we'd
wind up having 1 byte left that we were bogusly interpreting as a full
device path. We'd then dereference 2 bytes into that to get a length
of the node, which had undefined (and quite undesired) effects.

Sponsored by: Netflix, Inc
MFC After: 3 days

Details

Provenance
impAuthored on
Parents
rS339799: Ensure that the device path is sane before trying to decode and print
Branches
Unknown
Tags
Unknown