[FFmpeg-devel] [PATCH] pngdec: add ability to check chunk CRC

Michael Niedermayer michael at niedermayer.cc
Thu Mar 7 23:22:11 EET 2019


On Thu, Mar 07, 2019 at 07:26:32PM +0100, Lynne wrote:
> By default now, if AV_EF_CRCCHECK or AV_EF_IGNORE_ERR are enabled the decoder
> will skip the chunk and carry on with the next one. This should make the       
> decoder able to decode more corrupt files because the functions which decode
> individual chunks will very likely error out if fed invalid data and stop the
> decoding of the entire image.
> Should this be made default? CRC verification doesn't take long even for very
> large files.                                                      
> Also fix the length check for chunk size. It needs to take into account the
> 4 byte tag as well as the 4 byte CRC.
> 

>  pngdec.c |   19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 4255c91468cee2bc2fa757fae69762ff5ee5774a  0001-pngdec-add-ability-to-check-chunk-CRC.patch
> From 7aff99d12faf557753c5ee860a9672c7a09a26e3 Mon Sep 17 00:00:00 2001
> From: Lynne <dev at lynne.ee>
> Date: Thu, 7 Mar 2019 18:15:23 +0000
> Subject: [PATCH] pngdec: add ability to check chunk CRC
> 
> By default now, if AV_EF_CRCCHECK or AV_EF_IGNORE_ERR are enabled the decoder
> will skip the chunk and carry on with the next one. This should make the
> decoder able to decode more corrupt files because the functions which decode
> individual chunks will very likely error out if fed invalid data and stop the
> decoding of the entire image.
> Should this be made default? CRC verification doesn't take long even for very
> large files.

i would tend toward enabling it by default but maybe first post some
numbers of how much this changes decode time 


> Also fix the length check for chunk size. It needs to take into account the
> 4 byte tag as well as the 4 byte CRC.

this should be a seperate patch as its unrelated

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190307/56a700e5/attachment.sig>


More information about the ffmpeg-devel mailing list