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

2016-12-09 Thread Jan Beulich
>>> On 09.12.16 at 02:30, 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 ) >

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

2016-12-09 Thread Julien Grall
Hi Stefano, CC Jan as he is the maintainer of this code. Cheers, On 09/12/16 01:30, Stefano Stabellini wrote: HorizontalResolution and VerticalResolution are 32bit, while size is 64bit. As it stands the multiplication is evaluated with 32bit arithmetic, which could overflow. Cast HorizontalRes

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

2016-12-08 Thread Stefano Stabellini
HorizontalResolution and VerticalResolution are 32bit, while size is 64bit. As it stands the multiplication is evaluated with 32bit arithmetic, which could overflow. Cast HorizontalResolution to 64bit to avoid that. Coverity-ID: 1381858 Signed-off-by: Stefano Stabellini diff --git a/xen/common/