[poppler] Problem with your patch

Albert Astals Cid aacid at kde.org
Wed Dec 26 09:57:09 PST 2007


A Dimarts 25 Desembre 2007, Koji Otani va escriure:
> Hi,
> Very sorry, my patch has a bug again.
> PDF file that is not embedding CID Font is displayed with garbage
> characters.
>
> Please apply new patch attached this mail.
> new patch for git HEAD at Dec. 25.
>
> In previous patch, It calls getEmbeddedFontName() to check if font is
> embedded. But, this method allways return Non-NULL.
> So, new patch make it call getEmbeddedID() instead.

Changes pushed into the repository

Thanks

Albert

>
> ----------
> Koji Otani.
>
>
> From: Koji Otani <sho at bbr.jp>
> Subject: Re: [poppler] Problem with your patch
> Date: Thu, 20 Dec 2007 14:36:55 +0900 (JST)
> Message-ID: <20071220.143655.193697899.sho at bbr.jp>
>
> sho> Hi
> sho> I found 2 problems.
> sho>
> sho> (1) bad location of memory allocation code.
> sho>   and use null pointer.
> sho>   This causes crash.
> sho>
> sho> (2) But, getCodeToGIDMap function is called by the unexpected
> situation. sho> In test PDF File (getticket.pdf), fonts are embedded and
> CIDToGIDMap sho> entry is not contained. PDF specification sayes that if
> the TrueType font sho> program is embedded, the Type 2 CIDFont dictionary
> must contain a sho> CIDToGIDMap entry. (see PDF Reference, version 1.7 page
> 438). sho> So, when a font is embedded, getCodeToGIDMap need not be called
> sho> because cidToGID map is already set. but if CIDToGIDMap entry is sho>
> 'identity' or not contained, getCodeToGIDMap is called and returnes sho>
> incorrect cidToGID map.
> sho>
> sho> There has been problem(2) since poppler version 0.5.4 (before my
> sho> patches were applied.)
> sho>
> sho> I attached patch resolves these problems.
> sho>
> sho> (1) moved the allocation code to correct location.
> sho> (2) When a font is embedded, getCodeToGIDMap returnes cidToGID map
> sho> is already set.
> sho>
> sho> This patch also removed unused variables.
> sho>
> sho> Please apply this patch.
> sho>
> sho> Thanks,
> sho> ---------
> sho> Koji Otani
> sho>
> sho> From: Albert Astals Cid <aacid at kde.org>
> sho> Subject: Problem with your patch
> sho> Date: Wed, 19 Dec 2007 21:18:16 +0100
> sho> Message-ID: <200712192118.17083.aacid at kde.org>
> sho>
> sho> aacid> Hi Koji, when using poppler head with your latest patches, i
> get a crash in sho> aacid>
> http://bugs.freedesktop.org/attachment.cgi?id=13226
> sho> aacid>
> sho> aacid> Could you please have a look?
> sho> aacid>
> sho> aacid> I'm attaching the gdb backtrace.
> sho> aacid>
> sho> aacid> Albert




More information about the poppler mailing list