summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gs/base/seexec.c21
-rw-r--r--gs/base/sfilter.h2
-rw-r--r--gs/psi/zmisc1.c1
3 files changed, 6 insertions, 18 deletions
diff --git a/gs/base/seexec.c b/gs/base/seexec.c
index 9f0e1431b..58e53cc1a 100644
--- a/gs/base/seexec.c
+++ b/gs/base/seexec.c
@@ -67,7 +67,6 @@ s_exD_set_defaults(stream_state * st)
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;
@@ -139,25 +138,17 @@ s_exD_process(stream_state * st, stream_cursor_read * pr,
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 {
/*
diff --git a/gs/base/sfilter.h b/gs/base/sfilter.h
index 4bc2d2aa1..6fc9e7ee1 100644
--- a/gs/base/sfilter.h
+++ b/gs/base/sfilter.h
@@ -57,8 +57,6 @@ typedef struct stream_exD_state_s {
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 */
diff --git a/gs/psi/zmisc1.c b/gs/psi/zmisc1.c
index 94f8838ab..4a457edc5 100644
--- a/gs/psi/zmisc1.c
+++ b/gs/psi/zmisc1.c
@@ -156,7 +156,6 @@ zexD(i_ctx_t *i_ctx_p)
}
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);