diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2012-12-11 11:40:08 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2012-12-11 11:40:08 +0000 |
commit | fc101b568d7547030fceb58ab5f097d457d49c57 (patch) | |
tree | 0fa67c95ce9156faedc199ae6aa0d66fcbeafd2b /Build/source/texk/xdvipdfmx | |
parent | 3f97f77270f064ec8a8cceb05b083a8083c9cf1e (diff) |
Fix xdvipdfmx crash with UniBangla font
git-svn-id: svn://tug.org/texlive/trunk@28499 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvipdfmx')
-rw-r--r-- | Build/source/texk/xdvipdfmx/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/tt_cmap.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Build/source/texk/xdvipdfmx/ChangeLog b/Build/source/texk/xdvipdfmx/ChangeLog index 2e5da29e6d8..a3a6f0fd505 100644 --- a/Build/source/texk/xdvipdfmx/ChangeLog +++ b/Build/source/texk/xdvipdfmx/ChangeLog @@ -1,3 +1,8 @@ +2012-12-11 Khaled Hosnt <khaledhosny@eglug.org> + + * src/tt_cmap.c: Fix crash with fonts that has some glyphs without name + entries in 'post' table. + 2012-11-20 Peter Breitenlohner <peb@mppmu.mpg.de> * src/Makefile.am: Avoid use of deprecated INCLUDES. diff --git a/Build/source/texk/xdvipdfmx/src/tt_cmap.c b/Build/source/texk/xdvipdfmx/src/tt_cmap.c index 6b38c31c93a..1ac02796e43 100644 --- a/Build/source/texk/xdvipdfmx/src/tt_cmap.c +++ b/Build/source/texk/xdvipdfmx/src/tt_cmap.c @@ -874,11 +874,11 @@ handle_subst_glyphs (CMap *cmap, long unicodes[MAX_UNICODES]; int unicode_count = -1; int k; - if (gid < post->numberOfGlyphs) { + if (gid < post->numberOfGlyphs && post->glyphNamePtr[gid] != NULL) { unicode_count = agl_get_unicodes(post->glyphNamePtr[gid], unicodes, MAX_UNICODES); } if (unicode_count == -1) - MESG("No Unicode mapping available: GID=%u, name=%s", gid, + MESG("No Unicode mapping available: GID=%u, name=%s\n", gid, gid < post->numberOfGlyphs ? post->glyphNamePtr[gid] : "(none)"); else { /* the Unicode characters go into wbuf[2] and following, in UTF16BE */ |