[cairo-commit] src/cairo-ft-font.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Wed Mar 5 01:14:50 PST 2014
src/cairo-ft-font.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit f88bd92e8b3d87ec728e3fee51eb82f07db8c95c
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Mar 5 01:13:59 2014 -0800
Revert "[ft] Fix memory bug in copying bitmaps"
This reverts commit a0f556f37fb7016aa304b7cf0e811c0d38f0b969.
The change was clearly wrong now that I read. I was probably
tricked by what was fixed in the follow-up commit
e738079302a968b7b1fb9101cd4d92a8887bedce.
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 8c95863..e0b0f22 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1161,7 +1161,9 @@ _get_bitmap_surface (FT_Bitmap *bitmap,
source = bitmap->buffer;
dest = data;
for (i = height; i; i--) {
- memcpy (dest, source, stride);
+ memcpy (dest, source, bitmap->pitch);
+ memset (dest + bitmap->pitch, '\0', stride - bitmap->pitch);
+
source += bitmap->pitch;
dest += stride;
}
More information about the cairo-commit
mailing list