> > +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 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel