[Poppler-bugs] [Bug 28406] poppler crashes under certain pdf file
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Jun 6 23:44:31 PDT 2010
https://bugs.freedesktop.org/show_bug.cgi?id=28406
--- Comment #7 from Ilya Gorenbein <igorenbein at finjan.com> 2010-06-06 23:44:31 PDT ---
This is the code I run using poppler v. 0.12.4:
The input is the filename.
//--------------------------------------------------------
#include <iostream>
#include <string>
#include <fstream>
#include <poppler/PDFDoc.h>
int main( int argc, char* argv[] )
{
if( argc != 2 )
{
std::cout << "Usage: app filename" << std::endl;
return 1;
}// if
// This is done to approximate a memory of the system when there is no
space
// to allocate another big chunk of the memory.
// You can play with this number to reach the wanted flow.
char* p = (char*)gmalloc( 1024*1024*1024 );// 1 Gb
if( !p )
{
std::cout << "allocation failed" << std::endl;
}// if
GooString* fileName = new GooString( argv[1] );
PDFDoc m_pdf_doc_obj( fileName );
std::cout << "end" << std::endl;
return 0;
}// main
//--------------------------------------------------------
This is the output I've got:
Error: PDF file is damaged - attempting to reconstruct xref table...
Out of memory
//--------------------------------------------------------
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Poppler-bugs
mailing list