diff options
-rw-r--r-- | base/sa85d.h | 9 | ||||
-rw-r--r-- | psi/iscan.c | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/base/sa85d.h b/base/sa85d.h index 6e7462243..8685af7f4 100644 --- a/base/sa85d.h +++ b/base/sa85d.h | |||
@@ -41,7 +41,14 @@ typedef struct stream_A85D_state_s { | |||
41 | (ss)->min_left = 1; \ | 41 | (ss)->min_left = 1; \ |
42 | (ss)->word = 0; \ | 42 | (ss)->word = 0; \ |
43 | (ss)->odd = 0; \ | 43 | (ss)->odd = 0; \ |
44 | /* pdf_rules should not be initialized here */ \ | 44 | /* pdf_rules should not be initialized here. This flag is initialised in\ |
45 | * zA85D to either true or false, and this inline function is called *after*\ | ||
46 | * that in s_A85D_init to do the remaining initialisation. However, this\ | ||
47 | * inline function is also called from gs_scan_token to handle inline\ | ||
48 | * ASCII85 strings. These are not to be interpreted using PDF rules\ | ||
49 | * and so we must not set the flag here, but in the relevant calling\ | ||
50 | * functions.\ | ||
51 | */ \ | ||
45 | (ss)->require_eod=false; \ | 52 | (ss)->require_eod=false; \ |
46 | END | 53 | END |
47 | extern const stream_template s_A85D_template; | 54 | extern const stream_template s_A85D_template; |
diff --git a/psi/iscan.c b/psi/iscan.c index e5956e1bc..9b7151aa3 100644 --- a/psi/iscan.c +++ b/psi/iscan.c | |||
@@ -581,6 +581,10 @@ gs_scan_token(i_ctx_t *i_ctx_p, ref * pref, scanner_state * pstate) | |||
581 | s_A85D_init_inline(&sstate.s_ss.a85d); | 581 | s_A85D_init_inline(&sstate.s_ss.a85d); |
582 | sstate.s_ss.st.templat = &s_A85D_template; | 582 | sstate.s_ss.st.templat = &s_A85D_template; |
583 | sstate.s_ss.a85d.require_eod = true; | 583 | sstate.s_ss.a85d.require_eod = true; |
584 | /* If this is an inline ASCII string, interpret it normally, throw an error | ||
585 | * if it fails rather than ignoring it as PDF (Acrobat) does. | ||
586 | */ | ||
587 | sstate.s_ss.a85d.pdf_rules = false; | ||
584 | goto str; | 588 | goto str; |
585 | } | 589 | } |
586 | sputback_inline(s, sptr, endptr); | 590 | sputback_inline(s, sptr, endptr); |