In function T1_Decoder_Parse_Charstrings, take into account lenIV seed

bytes at the start of a decrypted subroutine.
This commit is contained in:
Tom Kacvinsky 2001-03-12 01:42:38 +00:00
parent 22e812a8c4
commit 9b59f2c385
1 changed files with 15 additions and 6 deletions

View File

@ -907,12 +907,21 @@
zone->cursor = ip; /* save current instruction pointer */ zone->cursor = ip; /* save current instruction pointer */
zone++; zone++;
zone->base = decoder->subrs[index] + decoder->lenIV;
/* The Type 1 driver stores subroutines without the seed bytes. */
/* The CID driver stores subroutines with seed bytes. This case */
/* is taken care of when decoder->subrs_len == 0. */
zone->base = decoder->subrs[index];
if (decoder->subrs_len) if (decoder->subrs_len)
zone->limit = zone->base + decoder->subrs_len[index]; zone->limit = zone->base + decoder->subrs_len[index];
else else
zone->limit = decoder->subrs[index+1]; {
/* We are using subroutines from a CID font. We must adjust */
/* for the seed bytes. */
zone->base += ( decoder->lenIV >= 0 ? decoder->lenIV : 0 );
zone->limit = decoder->subrs[index + 1];
}
zone->cursor = zone->base; zone->cursor = zone->base;