[Reproducible-commits] [strip-nondeterminism] 02/08: handlers/png: Warn if file contains garbage after IEND header
Chris Lamb
chris at chris-lamb.co.uk
Sun Jul 24 14:33:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch debian
in repository strip-nondeterminism.
commit 86f49c7358624b1242087e16410f692966c4def1
Author: Chris Lamb <lamby at debian.org>
Date: Sun Jul 24 15:26:25 2016 +0100
handlers/png: Warn if file contains garbage after IEND header
---
lib/File/StripNondeterminism/handlers/png.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/File/StripNondeterminism/handlers/png.pm b/lib/File/StripNondeterminism/handlers/png.pm
index 780258d..44700e2 100644
--- a/lib/File/StripNondeterminism/handlers/png.pm
+++ b/lib/File/StripNondeterminism/handlers/png.pm
@@ -137,11 +137,15 @@ sub _normalize {
# Copy through trailing garbage. Conformant PNG files don't have trailing
# garbage (see http://www.w3.org/TR/PNG/#15FileConformance item c), however
# in the interest of strip-nondeterminism being as transparent as possible,
- # we preserve the garbage.
+ # we preserve the garbage.(#802057)
+ my $garbage = 0;
while ($bytes_read = read($fh, $buf, 4096)) {
print $tempfile $buf;
+ $garbage += $bytes_read;
}
defined($bytes_read) or die "$filename: read failed: $!";
+ warn "$filename: $garbage bytes of garbage after IEND chunk"
+ if $garbage > 0;
return $modified;
}
--
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