summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2014-03-05 01:13:59 -0800
committerBehdad Esfahbod <behdad@behdad.org>2014-03-05 01:13:59 -0800
commitf88bd92e8b3d87ec728e3fee51eb82f07db8c95c (patch)
tree63fc37564df4816ea639ee62b76bc8d9dc85494d
parent5c9fdcb4aa9c3c32fe4760586c11924dc5fb47ef (diff)
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.
-rw-r--r--src/cairo-ft-font.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 8c95863b3..e0b0f227f 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;
}