From 95d9b43f8ad87bcfc180bd3cd9631c1f7ea83569 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 22 Jun 2015 13:15:03 +0200 Subject: Dpkg::Control::HashCore: Remove trailing space before handling dot-separators Regression introduced in commit aea291e3db1ac0414dcf005a0a607e78bdd77a5e. Any spaces after the blank line dot-separator should be stripped before handling the dot-separator, otherwise we get duplicated dots in field contents. Closes: #789580 Stable-Candidate: 1.16.x 1.17.x --- scripts/Dpkg/Control/HashCore.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/Dpkg/Control') diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm index 3a7b55116..21b474eac 100644 --- a/scripts/Dpkg/Control/HashCore.pm +++ b/scripts/Dpkg/Control/HashCore.pm @@ -220,10 +220,10 @@ sub parse { unless (defined($cf)) { $self->parse_error($desc, g_('continued value line not in field')); } + $line =~ s/\s*$//; if ($line =~ /^\.+$/) { $line = substr $line, 1; } - $line =~ s/\s*$//; $self->{$cf} .= "\n$line"; } elsif (m/^-----BEGIN PGP SIGNED MESSAGE-----[\r\t ]*$/) { $expect_pgp_sig = 1; -- cgit v1.2.3