efi_loader: initialize device path on alloc
authorPatrick Wildt <patrick@blueri.se>
Sun, 25 Mar 2018 17:54:03 +0000 (19:54 +0200)
committerAlexander Graf <agraf@suse.de>
Wed, 4 Apr 2018 09:22:35 +0000 (11:22 +0200)
commiteab2dc37ee457191583c5d9ff26ce9d7ccda3637
tree7534bd16923673ca9e779e491e7523d0e13ace0d
parente2742358661137b60eccd2e80b6835b58d8c5763
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>
lib/efi_loader/efi_device_path.c