On Sat, 2017-04-08 at 18:32 +0200, Matthew Brincke wrote:
> +    PODOFO_ASSERT( nFirstObject > 0 );

        Hi,
I do not like asserts, unless being used in unit tests or such places.
Especially this place is used to parse random data from outside, which
the library has no control of, then it's not a good idea to abort whole
application due to the broken/unexpected input. I know PODOFO_ASSERT()
is sensitive for debug builds, but anyway.

> +    PODOFO_ASSERT( sizeof(PdfParser::s_nMaxObjects) <= sizeof(size_t) );

sizeof() tells you how many bytes the argument holds. Is there a typo
in this test?

I didn't run either of the proposed patches yet, though I agree with
Matthew that if the checks can be done without ABI changes, then it'll
be a better option.

        Bye,
        zyx

-- 
http://www.litePDF.cz                                 i...@litepdf.cz

------------------------------------------------------------------------------
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
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to