--- ghostscript-8.62/src/origs/seexec.c 2007-12-15 17:37:56.000000000 -0800 +++ ghostscript-8.62/src/seexec.c 2008-07-25 15:12:50.000000000 -0700 @@ -67,7 +67,6 @@ ss->binary = -1; /* unknown */ ss->lenIV = 4; - ss->record_left = max_long; ss->hex_left = max_long; /* Clear pointers for GC */ ss->pfb_state = 0; @@ -138,25 +137,17 @@ decoder[p[i]] == ctype_space) ) { ss->binary = 1; - if (ss->pfb_state != 0) { - /* Stop at the end of the .PFB binary data. */ - ss->record_left = ss->pfb_state->record_left; - } break; } } if (ss->binary) { - if (count > ss->record_left) { - count = ss->record_left; - status = 0; - } /* - * We pause at the end of the .PFB binary data, - * in an attempt to keep from reading beyond the end of - * the encrypted data. + * There is no need to pause at the end of the binary portion. + * The padding bytes (which are in the text portion, in hexadecimal) + * do their job, provided the write buffer is <= 256 bytes long. + * This is (hopefully) ensured by the comment just above the + * definition of s_exD_template. */ - if ((ss->record_left -= count) == 0) - ss->record_left = max_long; pr->ptr = p + count; } else { /* --- ghostscript-8.62/src/origs/sfilter.h 2007-12-15 17:37:56.000000000 -0800 +++ ghostscript-8.62/src/sfilter.h 2008-07-25 15:12:50.000000000 -0700 @@ -57,8 +57,6 @@ bool keep_spaces; /* PS skips spaces after eexec, PDF doesn't */ /* The following change dynamically. */ int odd; /* odd digit */ - long record_left; /* data left in binary record in .PFB file, */ - /* max_long if not reading a .PFB file */ long hex_left; /* # of encoded chars to process as hex */ /* if binary == 0 */ int skip; /* # of decoded bytes to skip */ --- ghostscript-8.62/src/origs/zmisc1.c 2007-12-15 17:37:56.000000000 -0800 +++ ghostscript-8.62/src/zmisc1.c 2008-07-25 15:12:50.000000000 -0700 @@ -156,7 +156,6 @@ } pss->binary_to_hex = 0; } - state.record_left = pss->record_left; } } return filter_read(i_ctx_p, code, &s_exD_template, (stream_state *)&state, 0);