[dpkg] 19/27: Dpkg::Source::Package::V1: Check that $tarname is defined before use

Mattia Rizzolo mattia at debian.org
Mon Oct 23 18:10:29 UTC 2017


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

mattia pushed a commit to branch master
in repository dpkg.

commit db6c5b5043e51c196818c2d24070c089ca9ea1d4
Author: Christoph Biedl <debian.axhn at manchmal.in-ulm.de>
Date:   Fri Oct 20 01:29:48 2017 +0200

    Dpkg::Source::Package::V1: Check that $tarname is defined before use
    
    Closes: #879124
    Warned-by: perl
    Signed-off-by: Guillem Jover <guillem at debian.org>
---
 debian/changelog                  | 4 ++++
 scripts/Dpkg/Source/Package/V1.pm | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 345a4d3..b742172 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,10 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
     dpkg-buildpackage, instead of changing directory back and forth.
   * Setup and check rootcommand in dpkg-buildpackage only if it is going to
     be needed. Reported by Niels Thykier <niels at thykier.net>.
+  * Perl modules:
+    - Check that $tarname is defined before use in Dpkg::Source::Package::V1.
+      Thanks to Christoph Biedl <debian.axhn at manchmal.in-ulm.de>.
+      Closes: #879124
   * Documentation:
     - Update gettext minimal version in README.
     - Add a missing dot on the dpkg-buildflags(1) «lfs» feature paragraph.
diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm
index e7748c0..001d9ec 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -410,7 +410,7 @@ sub do_build {
     }
 
     $self->add_file($tarname) if $tarname;
-    if (-e "$tarname.sig" and not -e "$tarname.asc") {
+    if ($tarname and -e "$tarname.sig" and not -e "$tarname.asc") {
         openpgp_sig_to_asc("$tarname.sig", "$tarname.asc");
     }
     $self->add_file($tarsign) if $tarsign and -e $tarsign;

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



More information about the Reproducible-commits mailing list