[lintian] 01/01: Fix unescaped md5sum command
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit f9d9156e40fdd5d33549251f5f029b6686b14773
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date: Tue Jan 7 13:41:37 2014 +0100
Fix unescaped md5sum command
md5sum could add a \ at the beginning of md5sum meaning escape.
Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
lib/Lintian/Collect/Package.pm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index 648d1ca..3387153 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -232,10 +232,14 @@ sub md5sums {
while (my $line = <$fd>) {
chop($line);
next if $line =~ m/^\s*$/o;
- $line =~ m/^(\S+)\s*(\S.*)$/o
+ $line =~ m/^(?'escaped'\\)?(?'md5sum'\S+)\s*(?'file'\S.*)$/o
or fail "syntax error in $md5f info file: $line";
- my $zzsum = $1;
- my $zzfile = $2;
+ my $zzsum = $+{'md5sum'};
+ my $zzescaped = defined($+{'escaped'});
+ my $zzfile = $+{'file'};
+ if($zzescaped) {
+ $zzfile = _dequote_name($zzfile);
+ }
$zzfile =~ s,^(?:\./)?,,o;
$result->{$zzfile} = $zzsum;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: