diff options
-rw-r--r-- | Build/source/texk/ps2pkm/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/ps2pkm/pkout.c | 3 |
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++) |