summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2006-12-01 05:17:37 +0000
committerHenry Stiles <henry.stiles@artifex.com>2006-12-01 05:17:37 +0000
commit5d1dc78fc29b2cc9b1eed1a85780ac7e99692b7f (patch)
tree297999e9e1763f9ed01aab694f0ae851e9785836
parent0c220dd176cb12ed6a8bad555df6ff7d5c0d49c1 (diff)
The revision 2683 to fix Customer #160 was not complete. Because the
result is clamped and the command is executed this unmasked a problem in the command itself (Customer #161). The symbol set definition must have data equal to the symbol set header plus the table. The old code only checked there was sufficient data. CET 36-01 p. 11. git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@2687 06663e23-700e-0410-b217-a244a6096597
-rw-r--r--pcl/pcsymbol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pcl/pcsymbol.c b/pcl/pcsymbol.c
index 072d38c18..43b49f770 100644
--- a/pcl/pcsymbol.c
+++ b/pcl/pcsymbol.c
@@ -63,7 +63,7 @@ pcl_define_symbol_set(pcl_args_t *pargs, pcl_state_t *pcs)
{ int num_codes = last_code - first_code + 1;
int i;
- if ( num_codes <= 0 || num_codes > 256 || count < psm_header_size + num_codes * 2 )
+ if ( num_codes <= 0 || num_codes > 256 || (count != psm_header_size + num_codes * 2) )
return e_Range;
header =
(pl_symbol_map_t *)gs_alloc_bytes(mem,
@@ -276,7 +276,7 @@ pcsymbol_do_registration(
pcl_symbol_set_id_code,
pca_neg_error|pca_big_error)
DEFINE_CLASS_COMMAND_ARGS('(', 'f', 'W', "Define Symbol Set",
- pcl_define_symbol_set, pca_bytes|pca_big_ok|pca_big_clamp)
+ pcl_define_symbol_set, pca_byte_data|pca_neg_error|pca_big_clamp)
DEFINE_CLASS_COMMAND_ARGS('*', 'c', 'S', "Symbol Set Control",
pcl_symbol_set_control,
pca_neg_ignore|pca_big_ignore)