#define PIXREGION_END(reg) PIXREGION_BOX (reg, (reg)->data->numRects - 1)
#define GOOD_RECT(rect) ((rect)->x1 < (rect)->x2 && (rect)->y1 < (rect)->y2)
+#define BAD_RECT(rect) ((rect)->x1 > (rect)->x2 || (rect)->y1 > (rect)->y2)
#define PIXMAN_REGION_LOG_FAILURES
if (!GOOD_RECT (®ion->extents))
{
- log_region_error (FUNC, "Invalid rectangle passed");
+ if (BAD_RECT (®ion->extents))
+ log_region_error (FUNC, "Invalid rectangle passed");
PREFIX (_init) (region);
return;
}
{
if (!GOOD_RECT (extents))
{
- log_region_error (FUNC, "Invalid rectangle passed");
+ if (BAD_RECT (extents))
+ log_region_error (FUNC, "Invalid rectangle passed");
PREFIX (_init) (region);
return;
}
if (!GOOD_RECT (®ion.extents))
{
- log_region_error (FUNC, "Invalid rectangle passed");
+ if (BAD_RECT (®ion.extents))
+ log_region_error (FUNC, "Invalid rectangle passed");
return PREFIX (_copy) (dest, source);
}