Re: [PATCH] Avoid potential crash when subsurface's size is less than 0.

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Tue, 13 Mar 2012 10:00:37 +0800, Chuanbo Weng <[email protected]> wrote:
> When cairo_surface_create_for_rectangle() get non-integer parameters,
> the subsurface's size may be negative(e.g x = 0.2, width = 0.7, the
> final width will be -1). It may cause crash somewhere when use this
> subsurface. Although fractional surface is ill-defined, we should avoid
> crash when pass non-integer parameter.

I modified the patch slightly to reject an invalid negative width/height
passed in by the user as well as fixing up the case where we compute
the negative surface size.

Thanks,
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.