diff options
-rw-r--r-- | gs/devices/vector/gdevpsf1.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gs/devices/vector/gdevpsf1.c b/gs/devices/vector/gdevpsf1.c index e552fb886..370686440 100644 --- a/gs/devices/vector/gdevpsf1.c +++ b/gs/devices/vector/gdevpsf1.c | |||
@@ -237,6 +237,7 @@ static int CheckSubrForMM (gs_glyph_data_t *gdata, gs_font_type1 *pfont) | |||
237 | byte *source = data->data, *end = source + data->size; | 237 | byte *source = data->data, *end = source + data->size; |
238 | int CurrentNumberIndex = 0, Stack[32]; | 238 | int CurrentNumberIndex = 0, Stack[32]; |
239 | 239 | ||
240 | memset(Stack, 0x00, sizeof(Stack)); | ||
240 | gs_type1_decrypt(source, source, data->size, &state); | 241 | gs_type1_decrypt(source, source, data->size, &state); |
241 | 242 | ||
242 | if(pfont->data.lenIV) | 243 | if(pfont->data.lenIV) |
@@ -248,6 +249,8 @@ static int CheckSubrForMM (gs_glyph_data_t *gdata, gs_font_type1 *pfont) | |||
248 | switch (*source) { | 249 | switch (*source) { |
249 | case 12: | 250 | case 12: |
250 | if (*(source + 1) == 16) { | 251 | if (*(source + 1) == 16) { |
252 | if (CurrentNumberIndex < 1) | ||
253 | return gs_error_rangecheck; | ||
251 | switch(Stack[CurrentNumberIndex-1]) { | 254 | switch(Stack[CurrentNumberIndex-1]) { |
252 | case 18: | 255 | case 18: |
253 | code = 6; | 256 | code = 6; |