tags 578910 patch
thanks

On 2010-08-02 03:50:27 +0200, Vincent Lefevre wrote:
> The bug is fixed by the patch in
> 
>   http://ghostscript.com/pipermail/gs-cvs/2010-May/010942.html
> 
> (as said in the bug report). I haven't tried this patch under
> Debian, but I've applied it under Mac OS X, and it indeed fixes
> the problem: I no longer get the error with pdffonts and xpdf.

I've rebuilt the ghostscript packages from source with the attached
patch (same as in the above URL), and the problem is solved.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
diff -urNad ghostscript-8.71~dfsg2~/base/gsfcmap.c 
ghostscript-8.71~dfsg2/base/gsfcmap.c
--- ghostscript-8.71~dfsg2~/base/gsfcmap.c      2007-09-25 15:31:24.000000000 
+0200
+++ ghostscript-8.71~dfsg2/base/gsfcmap.c       2010-08-10 13:36:18.000000000 
+0200
@@ -500,12 +500,20 @@
            break;
     }
     penum->index[1] = j;
+    if (i > 255) {
     penum->entry.key[0][0] = (uchar)(i >> 8);
     penum->entry.key[0][cmap->key_size - 1] = (uchar)(i & 0xFF);
     penum->entry.key[1][0] = (uchar)(j >> 8);
     penum->entry.key[1][cmap->key_size - 1] = (uchar)((j - 1) & 0xFF);
     memcpy(penum->temp_value, map + i * gs_cmap_ToUnicode_code_bytes, 
                        gs_cmap_ToUnicode_code_bytes);
+    } else {
+       penum->entry.key[0][0] = (uchar)(i);
+       penum->entry.key[1][0] = (uchar)(j-1);
+       penum->entry.key_size = 1;
+       memcpy(penum->temp_value, map + i * gs_cmap_ToUnicode_code_bytes, 
+                       gs_cmap_ToUnicode_code_bytes);
+    }
     return 0;
 }
 

Reply via email to