[Reproducible-commits] [strip-nondeterminism] 01/03: Include CRC when reading potential PNG blocks

Chris Lamb chris at chris-lamb.co.uk
Tue Jul 19 16:32:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository strip-nondeterminism.

commit 4b180e366c219c822d0487dbdeef10e80eb4f9f5
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Jul 19 18:14:00 2016 +0200

    Include CRC when reading potential PNG blocks
---
 lib/File/StripNondeterminism/handlers/png.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/File/StripNondeterminism/handlers/png.pm b/lib/File/StripNondeterminism/handlers/png.pm
index 8c15b2c..6dcf204 100644
--- a/lib/File/StripNondeterminism/handlers/png.pm
+++ b/lib/File/StripNondeterminism/handlers/png.pm
@@ -65,6 +65,8 @@ sub normalize {
 	while (read($fh, my $header, 8) == 8) {
 		my ($len, $type) = unpack('Na4', $header);
 
+		# Include the trailing CRC when reading
+		$len += 4;
 		# We cannot trust the value of $len, so we only read(2) if it
 		# has a sane size.
 		if ($len < 4096) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/strip-nondeterminism.git



More information about the Reproducible-commits mailing list