https://bugs.gentoo.org/show_bug.cgi?id=264614 --- src/scfd.c 2008/07/28 22:23:04 8895 +++ src/scfd.c 2008/07/29 04:44:05 8896 @@ -161,7 +161,7 @@ /* makeup codes efficiently, since these are always a multiple of 64. */ #define invert_data(rlen, black_byte, makeup_action, d)\ if ( rlen > qbit )\ - { *q++ ^= (1 << qbit) - 1;\ + { if (q >= ss->lbuf) *q++ ^= (1 << qbit) - 1; else q++;\ rlen -= qbit;\ switch ( rlen >> 3 )\ {\ --- src/gdevpdtb.c 2009-04-05 23:45:35.000000000 +0400 +++ src/gdevpdtb.c 2009-04-05 23:45:46.000000000 +0400 @@ -137,7 +137,7 @@ &st_pdf_base_font, "pdf_base_font_alloc"); const gs_font_name *pfname = &font->font_name; gs_const_string font_name; - char fnbuf[3 + sizeof(long) / 3 + 1]; /* .F#######\0 */ + char fnbuf[2*sizeof(long) + 3]; /* .F########\0 */ int code; if (pbfont == 0)