diff options
Diffstat (limited to 'Build/source/texk/web2c/omegafonts/ligkern_routines.c')
-rw-r--r-- | Build/source/texk/web2c/omegafonts/ligkern_routines.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/omegafonts/ligkern_routines.c b/Build/source/texk/web2c/omegafonts/ligkern_routines.c index 5302466dfde..6291b9cfb76 100644 --- a/Build/source/texk/web2c/omegafonts/ligkern_routines.c +++ b/Build/source/texk/web2c/omegafonts/ligkern_routines.c @@ -82,7 +82,7 @@ void set_stop_command(void) { if (lk_step_ended == TRUE) { - lig_kern_table[nl-1].entries[0] = + lig_kern_table[nl-1].entries[0] = lig_kern_table[nl-1].entries[0] / 256 * 256 + STOP_FLAG; } else { warning_0("STOP must follow LIG or KRN; ignored"); @@ -316,7 +316,7 @@ int l_eval(unsigned x, unsigned y) { hash_list h; - + if ((x==CHAR_ERROR) || (y==CHAR_ERROR)) return CHAR_ERROR; h = l_hash_lookup(x, y); if (h == NULL) return y; @@ -427,22 +427,38 @@ check_ligature_program(unsigned c, unsigned lab) entry = lig_kern_table+lig_ptr; if (l_hash_input(lig_ptr,c)) { if (entry->entries[2] < KERN_FLAG) { - if (entry->entries[1] != bchar) + if (entry->entries[1] != bchar) { check_existence_and_safety(c, entry->entries[1], ligature_commands[entry->entries[2]], "%s character examined by (H %X)"); + if (entry->entries[1] > 0xffff) { + fprintf(stderr, "%s character (H %X) examined by (H %X) " + "exceeds ffff\n", ligature_commands[entry->entries[2]], entry->entries[1], c); + exit(2); + } + } if (entry->entries[3] >= 128) /* Needs fixing */ if ((c < 128) || (c == -1)) if ((entry->entries[1] < 128) || - (entry->entries[1] == bchar)) + (entry->entries[1] == bchar)) seven_bit_calculated = 0; check_existence_and_safety(c, entry->entries[3], ligature_commands[entry->entries[2]], "%s character generated by (H %X)"); + if (entry->entries[3] >0xffff) { + fprintf(stderr, "%s character (H %X) generated by (H %X) " + "exceeds ffff\n", ligature_commands[entry->entries[2]], entry->entries[3], c); + exit(2); + } } else { check_existence_and_safety(c, entry->entries[1], "KRN", "%s character examined by (H %X)"); + if (entry->entries[1] > 0xffff) { + fprintf(stderr, "KRN character (H %X) examined by (H %X) " + "exceeds ffff\n", entry->entries[1], c); + exit(2); + } } } if (entry->entries[0] >= STOP_FLAG) lig_ptr = nl; |