summaryrefslogtreecommitdiff
path: root/Build/source/texk/ps2pkm
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-25 11:40:36 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-25 11:40:36 +0000
commit81a1ae0580404be5dcb69e1a523987c52fcc0508 (patch)
tree3a7cb303de43b5be4e5518db27a87d98258a067e /Build/source/texk/ps2pkm
parent43454e4514da463416d54403b38507c66b2d888c (diff)
ps2pkm: Bug fix: Pretend that the first pixel of an empty glyph is white
otherwise the test case may use uninitialized data and fail git-svn-id: svn://tug.org/texlive/trunk@27153 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ps2pkm')
-rw-r--r--Build/source/texk/ps2pkm/ChangeLog6
-rw-r--r--Build/source/texk/ps2pkm/pkout.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/Build/source/texk/ps2pkm/ChangeLog b/Build/source/texk/ps2pkm/ChangeLog
index 9deaa83dd10..d78269b36ae 100644
--- a/Build/source/texk/ps2pkm/ChangeLog
+++ b/Build/source/texk/ps2pkm/ChangeLog
@@ -1,3 +1,9 @@
+2012-07-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * pkout.c (pk_runlengths): Pretend that the first pixel of an
+ empty glyph is white; avoid using uninitialized data.
+ Found by Martin Schroeder <martin@oneiros.de>.
+
2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
* ps2pk.c: Invoke kpse_set_program_name() with original argv[0]
diff --git a/Build/source/texk/ps2pkm/pkout.c b/Build/source/texk/ps2pkm/pkout.c
index cb6cb627b63..d1b2952c886 100644
--- a/Build/source/texk/ps2pkm/pkout.c
+++ b/Build/source/texk/ps2pkm/pkout.c
@@ -207,6 +207,9 @@ static void pk_runlengths(int W, int H, int (*next_pixel)())
if (runlength>0)
count[cnt++] = runlength;
+ /* for an empty glyph */
+ if (cnt == first_count) count[cnt++] = 0;
+
#ifdef DEBUG
current_value = BLACK;
for (i=first_count; i<cnt; i++)