Skip to content

Instantly share code, notes, and snippets.

@jjgod
Created August 3, 2014 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjgod/88bb45f2cc7711bf3fd0 to your computer and use it in GitHub Desktop.
Save jjgod/88bb45f2cc7711bf3fd0 to your computer and use it in GitHub Desktop.
Possible fix to r34757
diff --git a/texk/dvipdfm-x/cff.c b/texk/dvipdfm-x/cff.c
index 596b1cc..5ffedac 100644
--- a/texk/dvipdfm-x/cff.c
+++ b/texk/dvipdfm-x/cff.c
@@ -1119,7 +1119,7 @@ cff_charsets_lookup_inverse (cff_font *cff, card16 gid)
ERROR("Charsets data not available");
}
- if (gid == 0) {
+ if (gid == 0 || gid - 1 >= cff->charsets->num_entries) {
return 0; /* .notdef */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment