Bug#639516: [lib/Util.pm] control file parsers silently ignores some invalid lines
Package: lintian
Version: 2.5.2
Severity: minor
The control file parser silently ignores lines that don't start with
whitespace and don't contain a colon either. The attached patch should
fix this bug.
--
Jakub Wilk
diff --git a/lib/Util.pm b/lib/Util.pm
--- a/lib/Util.pm
+++ b/lib/Util.pm
@@ -147,6 +147,11 @@
$value =~ s/\s+$//;
$section->{$last_tag} .= "\n" . $value;
}
+ else {
+ my $message = "syntax error in section $cur_section";
+ $message.= " after the tag $last_tag: $_" if defined $last_tag;
+ fail($message);
+ }
}
# pass the last section (if not already done).
$code->($section) if $open_section;
Reply to: