From 3c8628bb3336fce72529ca53e1f236ca368ae0c9 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 29 Apr 2013 12:52:47 +0100 Subject: Bug 693939: Fix memory problems. 2 more memory problems pointed out by mhfan - many thanks. In the text device, run through the line height list to it's length, not to it's capacity. In the X11 image code, when copying data unchanged, copy whole ints, not just the first quarter of the bytes. --- fitz/dev_text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fitz') diff --git a/fitz/dev_text.c b/fitz/dev_text.c index 1f88818d..e9d18bb3 100644 --- a/fitz/dev_text.c +++ b/fitz/dev_text.c @@ -1365,7 +1365,7 @@ insert_line_height(line_heights *lh, fz_text_style *style, float height) #endif /* If we have one already, add it in */ - for (i=0; i < lh->cap; i++) + for (i=0; i < lh->len; i++) { /* Match if we are within 5% */ if (lh->lh[i].style == style && lh->lh[i].height * 0.95 <= height && lh->lh[i].height * 1.05 >= height) -- cgit v1.2.3