[cairo] A couple of valgrind warning fixes

Chris Wilson chris at chris-wilson.co.uk
Sun Mar 11 16:30:04 PDT 2007

valgrind issued a warning for the gcc-emitted memcpy for the struct
assignment within cairo-suface.c - I'm sure this has been discussed and
worked around on list before. Perhaps I'm thinking of the matrix copies?
Anyway the first patch, checks that the src!=dst before performing the

The second patch addresses an off-by-one within the convolution code in
lpyramid.c. The code subtracts one too many from the reflected index and
triggers a valgrind warning when it accesses elements before the start
of the array.

Chris Wilson.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-the-struct-copy-when-source-and-destination-ar.patch
Type: text/x-diff
Size: 1638 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070311/2976a839/0001-Avoid-the-struct-copy-when-source-and-destination-ar.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Correct-an-off-by-one-in-the-reflection-of-the-convo.patch
Type: text/x-diff
Size: 1230 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070311/2976a839/0002-Correct-an-off-by-one-in-the-reflection-of-the-convo.bin

More information about the cairo mailing list