]> git.dujemihanovic.xyz Git - u-boot.git/commit
efi_loader: sections with zero VirtualSize
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 29 Aug 2021 09:52:44 +0000 (11:52 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 4 Sep 2021 10:03:57 +0000 (12:03 +0200)
commit1ea133acd64eb0099865b0649b1d039ef63787ee
tree22554c9103968030f06a72346e96513adbdf4c3e
parentd6136c63ca287574d849865a449ee5fb607a9d99
efi_loader: sections with zero VirtualSize

In a section header VirtualSize may be zero. This is for instance seen in
the .sbat section of shim. In this case use SizeOfRawData as section size.

Fixes: 9d30a941cce5 ("efi_loader: don't load beyond VirtualSize")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Asherah Connor <ashe@kivikakk.ee>
lib/efi_loader/efi_image_loader.c