mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
efi_loader: initialize device path on alloc
Since the backing memory for a new device path can contain stale data we have to make sure that we zero the buffer. Otherwise some code paths that don't set all fields in a structure backed by this device path might contain unwanted stale data. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
committed by
Alexander Graf
parent
e274235866
commit
eab2dc37ee
@@ -66,6 +66,7 @@ static void *dp_alloc(size_t sz)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(buf, 0, sz);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user