I think the bug occurs because, in your pdf file, embedded font
HelveticaNeue-H75 does not define FontBBox in its FontFile.
So, in T1_GetFontBBox, a crash occurs at
obj =
&(pFontBase->pFontArray[FontID].pType1Data->fontInfoP[FONTBBOX].value.data.arrayP[0]);
(because
pFontBase->pFontArray[FontID].pType1Data->fontInfoP[FONTBBOX].value.data.arrayP
is still NULL)
I also investigated to find if other unspecified properties could cause
other crashes, and discovered that if Encoding is not set, t1lib also
crashed (in T1_LoadFont) because of that line.
if (strcmp( (char
*)pFontBase->pFontArray[FontID].pType1Data->fontInfoP[ENCODING].value.data.arrayP[i].data.arrayP,
you can reproduce that bug by editing /usr/share/fonts/type1/gsfonts/n019003l.pfb
and replacing
/Encoding StandardEncoding def
with
/Ancoding StandardEncoding def
(don't modify file length though)
and launching attached pdf genplano.pdf.bz2 (or any other pdf using
that font)
I attach a patch (for t1lib-5.1.0 or t1lib-5.1.1), to set default values
to fontbbox ([0 0 0 0]) and encoding (StandardEncoding) if they are not
defined in font file, but I don't known if it's a good idea, or if it
would be preferable to stop processing and to return an error.
I think the bug occurs because, in your pdf file, embedded font
HelveticaNeue-H75 does not define FontBBox in its FontFile.
So, in T1_GetFontBBox, a crash occurs at >pFontArray[ FontID] .pType1Data- >fontInfoP[ FONTBBOX] .value. data.arrayP[ 0]); >pFontArray[ FontID] .pType1Data- >fontInfoP[ FONTBBOX] .value. data.arrayP
obj =
&(pFontBase-
(because
pFontBase-
is still NULL)
I also investigated to find if other unspecified properties could cause
other crashes, and discovered that if Encoding is not set, t1lib also
crashed (in T1_LoadFont) because of that line.
if (strcmp( (char pFontBase- >pFontArray[ FontID] .pType1Data- >fontInfoP[ ENCODING] .value. data.arrayP[ i].data. arrayP,
*)
you can reproduce that bug by editing /usr/share/ fonts/type1/ gsfonts/ n019003l. pfb
and replacing
/Encoding StandardEncoding def
with
/Ancoding StandardEncoding def
(don't modify file length though)
and launching attached pdf genplano.pdf.bz2 (or any other pdf using
that font)
I attach a patch (for t1lib-5.1.0 or t1lib-5.1.1), to set default values
to fontbbox ([0 0 0 0]) and encoding (StandardEncoding) if they are not
defined in font file, but I don't known if it's a good idea, or if it
would be preferable to stop processing and to return an error.
arno
reassign 313236 t1lib
--