On Sun, 2018-01-14 at 22:30 +0100, Joerg Sonnenberger wrote:
> It is harmless for pretty much any implementation of mem*, since they
> can't actually dererence the pointer without checking the length
> first.
Hi,
I see, that might be it. I think I did run also with the Address
Sanitizer, but I can be wrong. I tried again, this time under gdb, and
there truly is a call with NULL pBuffer when reading the file, with the
below backtrace. I'll look at it later.
Thanks and bye,
zyx
#0 PoDoFo::PdfMemoryOutputStream::Write (this=0x7fffffffccb0, pBuffer=0x0,
lLen=0) at .../src/base/PdfOutputStream.cpp:124
#1 0x00007ffff7a921b5 in PoDoFo::PdfStream::GetFilteredCopy (this=0x62ebc0,
ppBuffer=0x7fffffffcd48, lLen=0x7fffffffcd40) at .../src/base/PdfStream.cpp:106
#2 0x00007ffff7a82b07 in PoDoFo::PdfObjectStreamParserObject::Parse
(this=0x7fffffffcf80, list=std::vector of length 1, capacity 1 = {...}) at
.../src/base/PdfObjectStreamParserObject.cpp:69
#3 0x00007ffff7a8ac1d in PoDoFo::PdfParser::ReadObjectFromStream
(this=0x62af40, nObjNo=3) at .../src/base/PdfParser.cpp:1255
#4 0x00007ffff7a8a2c3 in PoDoFo::PdfParser::ReadObjectsInternal
(this=0x62af40) at .../src/base/PdfParser.cpp:1173
#5 0x00007ffff7a89953 in PoDoFo::PdfParser::ReadObjects (this=0x62af40) at
.../src/base/PdfParser.cpp:1043
#6 0x00007ffff7a85c9d in PoDoFo::PdfParser::ParseFile (this=0x62af40,
rDevice=..., bLoadOnDemand=true) at .../src/base/PdfParser.cpp:220
#7 0x00007ffff7a85a16 in PoDoFo::PdfParser::ParseFile (this=0x62af40,
pszFilename=0x7fffffffe027
"podofo_0-9-5_podofoimgextract_undefined-behavior_PdfMemoryOutputStream-Write.pdf",
bLoadOnDemand=true)
at .../src/base/PdfParser.cpp:166
#8 0x00007ffff7b0aa51 in PoDoFo::PdfMemDocument::Load (this=0x7fffffffd6e0,
pszFilename=0x7fffffffe027
"podofo_0-9-5_podofoimgextract_undefined-behavior_PdfMemoryOutputStream-Write.pdf",
bForUpdate=false)
at .../src/doc/PdfMemDocument.cpp:256
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users