diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-12-10 09:22:25 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-12-10 09:22:25 +0000 |
commit | 70b9e104222eb5ba7a495c6267643c6470fb4667 (patch) | |
tree | 6b540c75177a4ec7d7ad0b607542c0f3620b1d3e /Build/source/texk/web2c/luatexdir/font/writecff.w | |
parent | db2683e88ae12a32ad6620b4e40218761ea14f41 (diff) |
LuaTeX: Sync with https://foundry.supelec.fr/svn/luatex/trunk r5092
git-svn-id: svn://tug.org/texlive/trunk@35779 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/font/writecff.w')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/font/writecff.w | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/luatexdir/font/writecff.w b/Build/source/texk/web2c/luatexdir/font/writecff.w index 3c9174d1aae..defe4b6841f 100644 --- a/Build/source/texk/web2c/luatexdir/font/writecff.w +++ b/Build/source/texk/web2c/luatexdir/font/writecff.w @@ -19,7 +19,7 @@ @ @c static const char _svn_version[] = - "$Id: writecff.w 4956 2014-03-28 12:12:17Z luigi $" + "$Id: writecff.w 5041 2014-07-16 16:13:03Z luigi $" "$URL: https://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/font/writecff.w $"; #include "ptexlib.h" @@ -169,8 +169,10 @@ cff_index *cff_get_index_header(cff_font * cff) idx->offset = xmalloc((unsigned) (((unsigned) count + 1) * sizeof(l_offset))); - for (i = 0; i < count + 1; i++) { + for (i = 0; i <count + 1 ; i++) { (idx->offset)[i] = get_offset(cff, idx->offsize); + if (i == USHRT_MAX) + break; } if (idx->offset[0] != 1) @@ -3158,7 +3160,7 @@ void write_cff(PDF pdf, cff_font * cffont, fd_entry * fd) } /* build the new charstrings entry */ - charstrings = cff_new_index((card16) (cs_count1 + 1)); + charstrings = cff_new_index((card16) (cs_count1==USHRT_MAX?cs_count1: cs_count1 + 1)); max_len = 2 * CS_STR_LEN_MAX; charstrings->data = xcalloc((unsigned) max_len, sizeof(card8)); charstring_len = 0; @@ -3437,7 +3439,7 @@ void write_cid_cff(PDF pdf, cff_font * cffont, fd_entry * fd) fdselect->num_entries = 0; fdselect->data.ranges = xcalloc(num_glyphs, sizeof(cff_range3)); - charstrings = cff_new_index((card16) (cs_count1 + 1)); + charstrings = cff_new_index((card16) (cs_count1==USHRT_MAX?cs_count1: cs_count1 + 1)); max_len = 2 * CS_STR_LEN_MAX; charstrings->data = xcalloc((unsigned) max_len, sizeof(card8)); charstring_len = 0; |