Skip to content
Commit 6a463bc1 authored by Sughosh Ganu's avatar Sughosh Ganu Committed by Heinrich Schuchardt
Browse files

EFI: Populate descriptor_count value only when image_info_size is not zero



The GetImageInfo function of the Firmware Mangement Protocol(FMP) gets
called initially to query the size of the image descriptor array that
would have to be allocated. During this call, the rest of the function
arguments, specifically pointers might be passed as NULL. Do not
populate the descriptor_count value before it is known that the call
to GetImageInfo has been made with the allocated buffer for the image
descriptors.

Signed-off-by: default avatarSughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
parent f1533c41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment