efi_loader: avoid NULL dereference in efi_get_memory_map()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 6 Aug 2018 20:28:18 +0000 (22:28 +0200)
committerAlexander Graf <agraf@suse.de>
Mon, 20 Aug 2018 12:41:09 +0000 (14:41 +0200)
commitfa995d0d9471b630d2d1942000d5a4f065c5cdd5
tree1b538aa8b3c8af56829df3031e128bd937ab1e96
parent3748ed908fd478b36bf698839632b2514c450513
efi_loader: avoid NULL dereference in efi_get_memory_map()

We should only dereference parameter memory_map_size after checking that
it is valid.

Fixes: 8e835554b36b ("efi_loader: check parameters of GetMemoryMap")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_memory.c