Numerous register fields in the relocator state are simply not
used depending on the relocator. This causes Coverity to flag
these fields but there is no real bug here. Simply initializing
the variable to {0} solves the issue. Fixed in the else case too
for consistency.
Fixes: CID 396932
Signed-off-by: Ross Philipson <ross.philipson@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
if (is_64bit)
{
- struct grub_relocator64_state state;
+ struct grub_relocator64_state state = {0};
grub_uint8_t *pagetable;
grub_uint32_t *stack;
grub_addr_t stack_target;
}
else
{
- struct grub_relocator32_state state;
+ struct grub_relocator32_state state = {0};
grub_uint32_t *stack;
grub_addr_t stack_target;