Commit adb57512 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt 💬 Committed by Alexander Graf
Browse files

efi_loader: correctly determine length of empty device path

efi_dp_size() is meant to return the device path length without the end

The length of a device path containing only an end node was incorrectly
reported as 4.
Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <>
Signed-off-by: default avatarAlexander Graf <>
parent 07836345
......@@ -234,6 +234,8 @@ unsigned efi_dp_size(const struct efi_device_path *dp)
unsigned sz = 0;
if (!dp || dp->type == DEVICE_PATH_TYPE_END)
return 0;
while (dp) {
sz += dp->length;
dp = efi_dp_next(dp);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment