The PdfInputDevice constructor in trunk may fail because the filename is copied
to a buffer (pStr) which isn't null terminated.
PdfInputDevice::PdfInputDevice( const wchar_t* pszFilename )
{
this->Init();
if( !pszFilename )
{
PODOFO_RAISE_ERROR( ePdfError_InvalidHandle );
}
try {
//m_pStream = new std::ifstream( pszFilename, std::ios::binary );
size_t strLen = wcslen(pszFilename);
char * pStr = new char[strLen+1];
wcstombs(pStr, pszFilename, strLen);
I think the last line should read:
wcstombs(pStr, pszFilename, strLen+1);
Regards
Mark
Mark Rogers - [email protected]
Electrum Multimedia Ltd - http://www. electrum.co.uk
Registered in Scotland No 158435 Registered Office 50 Lothian Road
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users