poppler/poppler/XRef.cc:943:21: runtime error: index -1 out of bounds for type 'char [256]' #0 0x5e62fd in XRef::constructXRef(bool*, bool) poppler/poppler/XRef.cc:943:21 #1 0x5e502f in XRef::XRef(BaseStream*, long long, long long, bool*, bool) poppler/poppler/XRef.cc:324:18 #2 0x595aec in PDFDoc::setup(GooString*, GooString*) poppler/poppler/PDFDoc.cc:282:14 #3 0x5960f7 in PDFDoc::PDFDoc(BaseStream*, GooString*, GooString*, void*) poppler/poppler/PDFDoc.cc:251:8 #4 0x4b0b1a in poppler::document_private::document_private(char const*, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) poppler/cpp/poppler-document.cpp:108:15 #5 0x4b6306 in poppler::document::load_from_raw_data(char const*, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) poppler/cpp/poppler-document.cpp:1099:33
Created attachment 138730 [details] PDF
Which sanitizer is that?
UndefinedBehavior
I can not reproduce that, can you reproduce it with any of our tools? i'm assuming you have some app you created yourself? Also you really need to be more verbose, like what version are you using
I'm using the latest code. I can also reproduce it with poppler-render. $ cpp/tests/poppler-render poppler-105970.pdf -o tmp.png poppler/poppler/XRef.cc:943:21: runtime error: index -1 out of bounds for type 'char [256]' #0 0x612e32 in XRef::constructXRef(bool*, bool) poppler/poppler/XRef.cc:943:21 #1 0x61185d in XRef::XRef(BaseStream*, long long, long long, bool*, bool) poppler/poppler/XRef.cc:324:18 #2 0x59fec6 in PDFDoc::setup(GooString*, GooString*) poppler/poppler/PDFDoc.cc:282:14 #3 0x59fb0a in PDFDoc::PDFDoc(GooString*, GooString*, GooString*, void*) poppler/poppler/PDFDoc.cc:182:8 #4 0x403dc1 in poppler::document_private::document_private(GooString*, std::string const&, std::string const&) poppler/cpp/poppler-document.cpp:77:15 #5 0x409677 in poppler::document::load_from_file(std::string const&, std::string const&, std::string const&) poppler/cpp/poppler-document.cpp:1047:33 #6 0x401a42 in main poppler/cpp/tests/poppler-render.cpp:84:44
Interestingly only the undefined sanitizer of clang gives this error and not the gcc one.
Fixed in master
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.