clone 585497 -1 reassign -1 libpoppler5 forcemerge 578050 -1 block 585497 by -1 thanks
It is actually a known bug in poppler. Let's clone it there.
This bug can be reproduced with langref.pdf file from systemtap-doc
package.
22 червня 2010 о 20:50 +0200 Eugeniy Meshcheryakov написав(-ла):
> I tried to debug this, but it looks very strange.
>
> The cmap looks like this:
>
> 311 0 obj
> <</Length 294>>stream
> /CIDInit /ProcSet findresource begin
> 12 dict begin
> begincmap
> /CMapType 2 def
> /CMapName/R857 def
> 1 begincodespacerange
> <0000><ffff>
> endcodespacerange
> 3 beginbfrange
> <000f><000f><2022>
> <0066><0066><007b>
> <0067><0067><007d>
> endbfrange
> endcmap
> CMapName currentdict /CMap defineresource pop
> end end
>
> endstream
> endobj
>
> From reading of pdf spec I can say that bfrange syntax is valid.
> parseCMap1() function that calls error() is in poppler. The code there
> looks like this:
>
> if (!strcmp(tok3, "[")) {
> ....
> } else if (tok3[0] == '<' && tok3[n3 - 1] == '>') {
> ....
> } else {
> error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
> }
>
> On call to error gdb shows:
>
> (gdb) print (char *)tok3
> $15 = 0x7fffda543fc0 "<007d>"
> (gdb) print n3
> $16 = 6
> (gdb) print tok3[n3-1]
> $18 = 62 '>'
> (gdb) print (tok3[0] == '<' && tok3[n3 - 1] == '>')
> $19 = true
>
> Now if anyone can tell me why branch with call to error() is executed
> instead of previous one...
>
> 22 червня 2010 о 12:52 -0400 Frank Ch. Eigler написав(-ла):
> > #0 error (pos=-1,
> > msg=0x351ad4bbf8 "Illegal entry in bfrange block in ToUnicode CMap")
> > at Error.cc:56
> > #1 0x000000351aca2f8a in CharCodeToUnicode::parseCMap1 (
> > this=<value optimized out>, getCharFunc=<value optimized out>,
> > data=<value optimized out>, nBits=<value optimized out>)
> > at CharCodeToUnicode.cc:343
signature.asc
Description: Digital signature

