[Reproducible-commits] [strip-nondeterminism] 04/08: Indent for next commit
Chris Lamb
chris at chris-lamb.co.uk
Sun Jul 24 14:33:56 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 0e46547924bd2014bafafdedeb1a6968d910fe71
Author: Chris Lamb <lamby at debian.org>
Date: Sun Jul 24 15:27:20 2016 +0100
Indent for next commit
---
lib/File/StripNondeterminism/handlers/png.pm | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/lib/File/StripNondeterminism/handlers/png.pm b/lib/File/StripNondeterminism/handlers/png.pm
index 44700e2..8b85db6 100644
--- a/lib/File/StripNondeterminism/handlers/png.pm
+++ b/lib/File/StripNondeterminism/handlers/png.pm
@@ -112,22 +112,21 @@ sub _normalize {
print $tempfile $header . $data;
next;
}
+ print $tempfile $header;
- print $tempfile $header;
+ while ($len > 0) {
+ # Can't trust $len so read data part in chunks
+ $bytes_read = read($fh, $buf, min($len, 4096));
- while ($len > 0) {
- # Can't trust $len so read data part in chunks
- $bytes_read = read($fh, $buf, min($len, 4096));
+ if ($bytes_read == 0) {
+ warn "$filename: invalid length in '$type' header";
+ return 0;
+ }
- if ($bytes_read == 0) {
- warn "$filename: invalid length in '$type' header";
- return 0;
+ print $tempfile $buf;
+ $len -= $bytes_read;
}
-
- print $tempfile $buf;
- $len -= $bytes_read;
- }
- defined($bytes_read) or die "$filename: read failed: $!";
+ defined($bytes_read) or die "$filename: read failed: $!";
# Stop processing immediately in case there's garbage after the
# PNG datastream. (https://bugs.debian.org/802057)
--
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