[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: If "public domain" matches then we will have no year and thus $1 will be uninitialised.



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 1ef8356a2863e660013f1d958a4609a3381ca688
Author: Chris Lamb <lamby@debian.org>
Date:   Thu Jul 20 08:56:35 2017 +0100

    If "public domain" matches then we will have no year and thus $1 will be uninitialised.
---
 checks/copyright-file.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/checks/copyright-file.pm b/checks/copyright-file.pm
index 6c4650b..aa284ee 100644
--- a/checks/copyright-file.pm
+++ b/checks/copyright-file.pm
@@ -342,7 +342,7 @@ qr/GNU (?:Lesser|Library) General Public License|(?-i:\bLGPL\b)/i
                |\bpublic(?:\s+|-)domain\b/xig
           ) {
             $seen_copyright = 1;
-            if ($latest_year && $1 > $latest_year) {
+            if ($latest_year && defined($1) && $1 > $latest_year) {
                 tag 'copyright-year-in-future', "($1 > $latest_year)";
             }
         }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: