efi_loader: fix off-by-one bug in efi_get_variable