CRC32 check for IDAT chunks

Nicolas Badoux <[email protected]> Wed, 30 Jan 2019 18:49:02 +0100
Newsgroups gmane.comp.graphics.png.devel
Message-ID <CAMJ5jhvbBgN6rzo4MBrjFePe=P4Z5AtYp_nMFJHT7Nji0nMnHw@mail.gmail.com>
Hi,

I'm looking at the code of libpng and was wondering why there is not always
a check to verify the CRC32 value when reading IDAT chunks.
If I'm correct, the CRC is calculated at line 4193 of pngrutil.c
(lbpng-1.6.36). The call to inflate on line 4225 can happen without that
the CRC value was checked against the value in the file.
Is this done willingly to spare time as inflate will likely fail anyway?
If I got something wrong, can you point me to the line where the CRC value
of IDAT chunks are checked?

Best regards,

Nicolas Badoux

_______________________________________________
png-mng-implement mailing list
png-mng-implement-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/png-mng-implement