[cairo-commit] libpixman/src ic.c,1.16,1.17
Carl Worth
commit at pdx.freedesktop.org
Tue Jan 4 11:55:39 PST 2005
Committed by: cworth
Update of /cvs/cairo/libpixman/src
In directory gabe:/tmp/cvs-serv22144/src
Modified Files:
ic.c
Log Message:
* src/ic.c (pixman_composite): Do nothing if src image has width
or height == 0 to avoid potential divide-by-zero.
Index: ic.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/ic.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- ic.c 27 Oct 2004 14:26:36 -0000 1.16
+++ ic.c 4 Jan 2005 19:55:36 -0000 1.17
@@ -882,6 +882,12 @@
int dstAlphaMap = iDst->alphaMap != 0;
int x_msk, y_msk, x_src, y_src, x_dst, y_dst;
int w, h, w_this, h_this;
+
+ if (iSrc->pixels->width == 0 ||
+ iSrc->pixels->height == 0)
+ {
+ return;
+ }
xDst += iDst->pixels->x;
yDst += iDst->pixels->y;
More information about the cairo-commit
mailing list