mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
efi: fix devpath_is_partition()
If the path consists only of an end node, it does not refer to a partition. Avoid returning a random value from the stack in this case. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
7ea79e511d
commit
dd1086ac6b
@ -190,7 +190,7 @@ static void free_memory(struct efi_priv *priv)
|
|||||||
static bool devpath_is_partition(const struct efi_device_path *path)
|
static bool devpath_is_partition(const struct efi_device_path *path)
|
||||||
{
|
{
|
||||||
const struct efi_device_path *p;
|
const struct efi_device_path *p;
|
||||||
bool was_part;
|
bool was_part = false;
|
||||||
|
|
||||||
for (p = path; p->type != DEVICE_PATH_TYPE_END;
|
for (p = path; p->type != DEVICE_PATH_TYPE_END;
|
||||||
p = (void *)p + p->length) {
|
p = (void *)p + p->length) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user