Ghostscript version: GNU GhostScript 8.56 Where you got Ghostscript: FTP'd from ftp.gnu.org:/gnu/ghostscript
Hardware you are using: Generic x86 platform Operating system you are using: Sun Solaris 9 x86 C compiler you are using: GNU gcc 3.4.6 Symptoms: Using a CMap that has glyph names with a base font causes a crash in x_char_xglyph. The problem is that code_map_decode_next_multidim_regime fails to clear pchr when returning the glyph as a result x_char_xglyph attempts to use the character code as an index to a gs_map_XXX_to_XXX array which can't possible work since the CMap character code is just an arbitrary string which only has meaning to the CMap. Sample file which causes the crash when using the X11 output device is enclosed below. Suggested fix (if any): Apply the patch encoded below and rebuild GhostScript. --------------8<------------------8<-------------------8<-------------------- *** src/gsfcmap1.c.ORIGINAL Mon May 7 07:21:46 2007 --- src/gsfcmap1.c Mon Nov 26 21:07:58 2007 *************** code_map_decode_next_multidim_regime(con *** 299,304 **** --- 299,305 ---- return 0; case CODE_VALUE_GLYPH: *pglyph = bytes2int(pvalue, pclr->value_size); + *pchr = gs_no_char; return 0; case CODE_VALUE_CHARS: *pglyph = --------------8<------------------8<-------------------8<-------------------- %!PS %% Handle UTF-8 encoded Latin text. %% Unicode ranges handled by the CMap: %% %% U+20A0 - U+20AF %% %% Note that the actual usable characters is limited by the %% available glyphs in the font. /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CMapName /Latin-UTF8-H def /CMapType 1 def /CIDSystemInfo [ null ] def /WMode 0 def 4 begincodespacerange <00> <7F> <C280> <DFBF> <E0A080> <E0BFBF> <E18080> <ECBFBF> endcodespacerange 16 beginbfchar <E282A0> /uni20A0 <E282A1> /colonmonetary <E282A2> /cruzeiro <E282A3> /franc <E282A4> /lira <E282A5> /uni20A5 <E282A6> /uni20A6 <E282A7> /peseta <E282A8> /uni20A8 <E282A9> /won <E282AA> /afii57636 <E282AB> /dong <E282AC> /Euro <E282AD> /uni20AD <E282AE> /uni20AE <E282AF> /uni20AF endbfchar endcmap CMapName currentdict /CMap defineresource pop end end /Courier-UTF8 /Latin-UTF8-H [ /Courier ] composefont pop /Courier-UTF8 12 selectfont 18 738 moveto (\342\202\254) show showpage ------------------------------------------------------------------------- | Feith Systems | Voice: 1-215-646-8000 | Email: [EMAIL PROTECTED] | | John Wehle | Fax: 1-215-540-5495 | | -------------------------------------------------------------------------