Skip to content
Commit a5d6a567 authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

Platform/ARM/BdsLib: maintain alignment for DevicePaths



DevicePath node types may have any size, and so it is up to the
code that manipulates them to ensure that dereferencing them only
occurs when the pointer is aligned explicitly.

Since BdsConnectAndUpdateDevicePath() has only two callers, one of
which itself, we can simply duplicate the device path (similar to
how DxeCore's CoreConnectController () does it), and free the pool
allocation again on the way out. (Note that the allocation only
occurs when the non-recursive path is taken and the function
returns EFI_SUCCESS)

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
Tested-by: Thomas Abraham's avatarThomas Abraham <thomas.abraham@arm.com>
Reviewed-by: default avatarLeif Lindholm <leif.lindholm@linaro.org>
parent 8aa9c252
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment