-
Adam Jackson authored
These are paranoid about integer overflow, and will return -1 if their operation would overflow a (signed) integer or if either argument is negative. Note that RenderLarge requests are sized with a uint32_t so in principle this could be sketchy there, but dix limits bigreqs to 128M so you shouldn't ever notice, and honestly if you're sending more than 2G of rendering commands you're already doing something very wrong. v2: Use INT_MAX for consistency with the rest of the server (jcristau) v3: Reject negative arguments (anholt) v4: RHEL5: add limits.h, use inline v5: backport to nx-libs 3.6.x (Mike DePaulo) Reviewed-by:
Keith Packard <keithp@keithp.com> Reviewed-by:
Julien Cristau <jcristau@debian.org> Reviewed-by:
Michal Srb <msrb@suse.com> Reviewed-by:
Andy Ritger <aritger@nvidia.com> Signed-off-by:
Adam Jackson <ajax@redhat.com> Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by:
Fedora X Ninjas <x@fedoraproject.org> Signed-off-by:
Dave Airlie <airlied@redhat.com>
1a9f2311