[SCM] Debian package checker branch, master, updated. 2.5.2-31-g6c3a5ee
The following commit has been merged in the master branch:
commit 6c3a5ee1921bb52f49634e5d0adc08bce5462f7c
Author: Niels Thykier <niels@thykier.net>
Date: Wed Aug 17 22:01:49 2011 +0200
Stopped assuming Files in a .changes file is always valid
Lintian::ProcessableGroup now properly copes if an element in
the values of the "Files" is missing. This avoid a number of
"uninitialized value"-warnings if the field is malformed.
diff --git a/lib/Lintian/ProcessableGroup.pm b/lib/Lintian/ProcessableGroup.pm
index 6724108..e3c9a7a 100644
--- a/lib/Lintian/ProcessableGroup.pm
+++ b/lib/Lintian/ProcessableGroup.pm
@@ -96,7 +96,10 @@ sub _init_group_from_changes {
# - just the file name please.
(undef, undef, undef, undef, $file) = split(/\s+/o, $line);
- next if $file =~ m,/,;
+ # If the field is malformed, $file may be undefined; we also
+ # skip it, if it contains a "/" since that is most likely a
+ # traversal attempt
+ next if !$file || $file =~ m,/,o;
if (not -f "$cdir/$file") {
print STDERR "$cdir/$file does not exist, exiting\n";
--
Debian package checker
Reply to: