On 2018-07-07 02:36 AM, Keith Packard wrote:
> This adds support for RandR CRTC/Output leases through the modesetting
> driver, creating a lease using new kernel infrastructure and returning
> that to a client through an fd which will have access to only those
> resources.
> 
> [...]
> 
> +     nobjects = ncrtc + noutput;
> +
> +     if (nobjects == 0)
> +             return BadValue;

As I mentioned on IRC, this addition can already overflow (to a non-0
value). That's one reason I decided against using xallocarray in my
patch (but instead explicitly check against overflow of the addition and
multiplication).


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to