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

[lintian] 01/01: checks/changelog-file: Fix use of uninitialized value



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

jwilk pushed a commit to branch master
in repository lintian.

commit 9b77504000a34ce3c25d14f130d59e4912895602
Author: Jakub Wilk <jwilk@debian.org>
Date:   Wed Mar 9 22:43:55 2016 +0100

    checks/changelog-file: Fix use of uninitialized value
    
    Use of uninitialized value $date in pattern match could happen when the
    top changelog entry trailer had an incorrectly formatted date.
---
 checks/changelog-file.pm | 1 +
 debian/changelog         | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/checks/changelog-file.pm b/checks/changelog-file.pm
index afcf830..f0b384d 100644
--- a/checks/changelog-file.pm
+++ b/checks/changelog-file.pm
@@ -281,6 +281,7 @@ sub run {
         if ($first_timestamp) {
             my $dch_date = $entries[0]->Date;
             my ($weekday_declared, $date) = split(m/,\s*/, $dch_date, 2);
+            $date //= '';
             my ($tz, $weekday_actual);
 
             if ($date =~ m/[ ]+ ([^ ]+)\Z/xsm) {
diff --git a/debian/changelog b/debian/changelog
index 5a90992..ddb17be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ lintian (2.5.43) UNRELEASED; urgency=medium
       (partially) unstripped static libraries.
     + [NT] Remove the experimental marker from the no-pie and
       no-bindnow hardening tags.
+  * checks/changelog-file.pm:
+    + [JW] Fix use of uninitialized value when checking incorrectly
+      formatted changelog entries.
 
   * commands/reporting-lintian-harness.pm:
     + [NT] Add missing close and seek to the end of the new

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


Reply to: