summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2012-05-21 08:54:59 +0100
committerKen Sharp <ken.sharp@artifex.com>2012-05-21 08:55:29 +0100
commit4677f28c2a0bf72a6bc89e785cc651d3deedc043 (patch)
treea6cb953aaf14a094f89430eddbdbf8dd8a542440
parent535d11e8a1d667a3d71680b27f18e4a89df98b2d (diff)
txtwrite - Bug #693046 handle TEXT_FROM_CHARS and TEXT_FROM_SINGLE_CHAR ops
I seem to have overlooked these operations when writing the original code, probably because I couldn't' find any test cases. However PCL seems to make extensive use of them, and the lack of code causes access outside array boundaries. Fixed here in a simplistic fashion, which seems to work well. No differences expected, txtwrite is not cluster tested
-rw-r--r--gs/base/gdevtxtw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gs/base/gdevtxtw.c b/gs/base/gdevtxtw.c
index 9b36a1c2c..218eade33 100644
--- a/gs/base/gdevtxtw.c
+++ b/gs/base/gdevtxtw.c
@@ -1875,7 +1875,7 @@ txtwrite_process_plain_text(gs_text_enum_t *pte)
if (operation & (TEXT_FROM_STRING | TEXT_FROM_BYTES)) {
ch = pte->text.data.bytes[pte->index++];
} else if (operation & (TEXT_FROM_CHARS | TEXT_FROM_SINGLE_CHAR)) {
- ;
+ ch = pte->text.data.bytes[pte->index++];
} else if (operation & (TEXT_FROM_GLYPHS | TEXT_FROM_SINGLE_GLYPH)) {
if (operation & TEXT_FROM_GLYPHS) {
gdata = pte->text.data.glyphs + (pte->index++ * sizeof (gs_glyph));