-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pullup ticket #5471 - requested by sevan
fonts/fontconfig: bugfix Revisions pulled up: - fonts/fontconfig/Makefile 1.98 - fonts/fontconfig/distinfo 1.56 - fonts/fontconfig/patches/patch-src_fccache.c 1.1 --- Module Name: pkgsrc Committed By: jperkin Date: Tue May 30 16:53:14 UTC 2017 Modified Files: pkgsrc/fonts/fontconfig: Makefile distinfo Added Files: pkgsrc/fonts/fontconfig/patches: patch-src_fccache.c Log Message: Apply upstream patch for https://bugs.freedesktop.org/show_bug.cgi?id=97546 which fixes cache generation on OSX. Raised in joyent/pkgsrc#506. Bump PKGREVISION.
- Loading branch information
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
$NetBSD: patch-src_fccache.c,v 1.1.2.2 2017/06/13 19:19:53 bsiegert Exp $ | ||
|
||
Apply upstream patch for https://bugs.freedesktop.org/show_bug.cgi?id=97546 | ||
|
||
--- src/fccache.c.orig 2016-08-05 05:35:05.000000000 +0000 | ||
+++ src/fccache.c | ||
@@ -640,6 +640,7 @@ FcCacheOffsetsValid (FcCache *cache) | ||
FcPattern *font = FcFontSetFont (fs, i); | ||
FcPatternElt *e; | ||
FcValueListPtr l; | ||
+ char *last_offset; | ||
|
||
if ((char *) font < base || | ||
(char *) font > end - sizeof (FcFontSet) || | ||
@@ -653,11 +654,17 @@ FcCacheOffsetsValid (FcCache *cache) | ||
if (e->values != 0 && !FcIsEncodedOffset(e->values)) | ||
return FcFalse; | ||
|
||
- for (j = font->num, l = FcPatternEltValues(e); j >= 0 && l; j--, l = FcValueListNext(l)) | ||
- if (l->next != NULL && !FcIsEncodedOffset(l->next)) | ||
- break; | ||
- if (j < 0) | ||
- return FcFalse; | ||
+ for (j = 0; j < font->num; j++) | ||
+ { | ||
+ last_offset = (char *) font + font->elts_offset; | ||
+ for (l = FcPatternEltValues(&e[j]); l; l = FcValueListNext(l)) | ||
+ { | ||
+ if ((char *) l < last_offset || (char *) l > end - sizeof (*l) || | ||
+ (l->next != NULL && !FcIsEncodedOffset(l->next))) | ||
+ return FcFalse; | ||
+ last_offset = (char *) l + 1; | ||
+ } | ||
+ } | ||
} | ||
} | ||
|