[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] fix potential int overflow in efi/boot



>>> On 09.12.16 at 02:30, <sstabellini@xxxxxxxxxx> wrote:
> --- a/xen/common/efi/boot.c
> +++ b/xen/common/efi/boot.c
> @@ -687,7 +687,7 @@ static UINTN __init 
> efi_find_gop_mode(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop,
>               mode_info->HorizontalResolution *
>               mode_info->VerticalResolution > size )
>          {
> -            size = mode_info->HorizontalResolution *
> +            size = (UINTN) mode_info->HorizontalResolution *
>                     mode_info->VerticalResolution;
>              gop_mode = i;
>          }

From a strictly formal perspective this is of course correct, but I'm
not convinced it matters in practice (imagine how huge a monitor we
need to overflow 4G pixels). But I'm willing to accept the patch,
provided you remove the stray space and (more importantly) you
also fix the other multiplication (visible in patch context) too.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.