Hi,

Thanks for reporting. I fixed those errors and added regression tests for them.

Regards,
        Dom

Am Mittwoch 02 Juni 2010 schrieb Mark Rogers:
> Hi
> 
> I've got a couple of fixes for access violations in PDFs found in the wild:
> 
> PdfPagesTree.cpp
> PdfPagesTree::GetPage crashes on PDFs where the value of the "Count" key
>  returned by GetTotalNumberOfPages is bigger than the actual number of
>  pages in the tree. Changes:
>  97 Change:         if( pPage->GetObject()->Reference() == ref )
>         To:         if( pPage != NULL && pPage->GetObject()->Reference() ==
>  ref )
> 
> PdfAnnotation.cpp
> Out by one error in s_lNumActions (count includes terminating NULL entry,
>  which looks wrong and faults in PdfElement::TypeNameToIndex if name isn't
>  found). Bug fires if an annotation name doesn't match any of the
>  annotation actions in the table. Changes:
>  35 Change: const long  PdfAnnotation::s_lNumActions = 26;
> To : const long  PdfAnnotation::s_lNumActions = 25;
> 
> BTW The same issue affects PdfAction::s_lNumActions
> 
> PdfElement.cpp
> PdfElement::TypeNameToIndexfaults if ppTypes[] contains sentinel NULL
>  entries and name isn't found Changes:
> 98 Change:         if( strcmp( pszType, ppTypes[i] ) == 0 )
>         To:         if( ppTypes[i] != NULL && strcmp( pszType, ppTypes[i] )
>  == 0 )
> 
> Regards
> Mark
> 
> Mark Rogers - [email protected]
> PowerMapper Software Ltd - http://www.powermapper.com
> Quartermile 2 Edinburgh EH3 9GL Registered in Scotland No 362274
> Phone +44 845 056 8475
> 


-- 
**********************************************************************
Dominik Seichter - [email protected]
KRename  - http://www.krename.net  - Powerful batch renamer for KDE
KBarcode - http://www.kbarcode.net - Barcode and label printing
PoDoFo - http://podofo.sf.net - PDF generation and parsing library
SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game,  for KDE
Alan - http://alan.sf.net - A Turing Machine in Java
**********************************************************************

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to