Re: [Spice-devel] [PATCH 1/3] drm/qxl: add mode/framebuffer check functions

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

 



> > +static int qxl_check_mode(struct qxl_device *qdev,
> > +			  unsigned int width,
> > +			  unsigned int height)
> > +{
> > +	if (width * height * 4 > qdev->vram_size)
> 
> Is someone checking for integer overflows already?

Need to have a look.  This is just ...

> > -	if (bo->surf.stride * bo->surf.height > qdev->vram_size) {
> > -		DRM_ERROR("Mode doesn't fit in vram size (vgamem)");
> > -		return -EINVAL;
> > -	}

... that check moved into the new function.

cheers,
  Gerd

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux