Bug 104517 - poppler-master (4c7814): abort on invalid XRef
Summary: poppler-master (4c7814): abort on invalid XRef
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-06 20:06 UTC by LE GARREC Vincent
Modified: 2018-01-08 22:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
abort_on_dead_object.pdf (904 bytes, application/pdf)
2018-01-06 20:06 UTC, LE GARREC Vincent
Details

Description LE GARREC Vincent 2018-01-06 20:06:32 UTC
Created attachment 136586 [details]
abort_on_dead_object.pdf

Console output:
Syntax Warning: May not be a PDF file (continuing anyway)
Syntax Error: Dictionary key must be a name object
Syntax Error: End of file inside dictionary
Syntax Warning: No valid XRef size in trailer
Internal Error (0): Call to dead object

Backtrack:
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff719ccaf in __GI_abort () at abort.c:90
#2  0x00007ffff7abc602 in Object::isNull (this=<optimized out>)
    at /home/legarrec/info/programmation/poppler/poppler/Object.h:196
#3  XRef::fetch (this=this@entry=0x5555557b1d70, num=1, gen=0, 
    recursion=recursion@entry=0)
    at /home/legarrec/info/programmation/poppler/poppler/XRef.cc:1126
#4  0x00007ffff7abd19c in XRef::getCatalog (this=0x5555557b1d70)
    at /home/legarrec/info/programmation/poppler/poppler/XRef.cc:1103
#5  0x00007ffff7a25b45 in Catalog::Catalog (this=0x5555557b2160, 
    docA=0x5555557b16c0)
    at /home/legarrec/info/programmation/poppler/poppler/Catalog.cc:106
#6  0x00007ffff7aa2da8 in PDFDoc::setup (this=this@entry=0x5555557b16c0, 
    ownerPassword=ownerPassword@entry=0x0, userPassword=userPassword@entry=0x0)
    at /home/legarrec/info/programmation/poppler/poppler/PDFDoc.cc:293
#7  0x00007ffff7aa2f3c in PDFDoc::PDFDoc (this=0x5555557b16c0, 
    fileNameA=<optimized out>, ownerPassword=0x0, userPassword=0x0, 
    guiDataA=<optimized out>)
    at /home/legarrec/info/programmation/poppler/poppler/PDFDoc.cc:179
#8  0x00007ffff7a98195 in LocalPDFDocBuilder::buildPDFDoc (
    this=<optimized out>, uri=..., ownerPassword=0x0, userPassword=0x0, 
    guiDataA=0x0)
    at /home/legarrec/info/programmation/poppler/poppler/LocalPDFDocBuilder.cc:31
#9  0x000055555555e505 in main (argc=<optimized out>, argv=0x7fffffffd818)
    at /home/legarrec/info/programmation/poppler/utils/pdftohtml.cc:249

Doesn't crash in poppler-0.57.
I bisect: commit 3c29ded4bee5eadb829ed46af2ec92be57b0077b

Make Object free itself on init and destruction
Will make for a *much* easier way to code.

Patches with more std::move coming on top.

Most things seem to work though i'm pretty sure some things are broken.

NEEDS TESTING
Comment 1 Albert Astals Cid 2018-01-08 22:29:07 UTC
Fixed, thanks :)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.