[debhelper-devel] [Git][debian/debhelper][master] Buildsystem.pm: Fix use of undefined variable

Niels Thykier gitlab at salsa.debian.org
Sun Apr 8 09:43:10 UTC 2018


Niels Thykier pushed to branch master at Debian / debhelper


Commits:
aa2b021c by Niels Thykier at 2018-04-08T09:41:14+00:00
Buildsystem.pm: Fix use of undefined variable

Signed-off-by: Niels Thykier <niels at thykier.net>

- - - - -


2 changed files:

- debian/changelog
- lib/Debian/Debhelper/Buildsystem.pm


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+debhelper (11.2.2) UNRELEASED; urgency=medium
+
+  * Buildsystem.pm: Fix use of undefined variable in certain
+    error conditions.
+
+ -- Niels Thykier <niels at thykier.net>  Sun, 08 Apr 2018 09:40:32 +0000
+
 debhelper (11.2.1) unstable; urgency=medium
 
   * Buildsystem.pm: Correctly pass build directory values to


=====================================
lib/Debian/Debhelper/Buildsystem.pm
=====================================
--- a/lib/Debian/Debhelper/Buildsystem.pm
+++ b/lib/Debian/Debhelper/Buildsystem.pm
@@ -21,8 +21,10 @@ sub NAME {
 	my $class = ref($this);
 	my $target_name;
 	if ($class) {
-		if ($this->IS_GENERATOR_BUILD_SYSTEM) {
-			$target_name = $this->{'targetbuildsystem'}->NAME;
+		# Do not assume that the target buildsystem has been provided.
+		# NAME could be called during an error in the constructor.
+		if ($this->IS_GENERATOR_BUILD_SYSTEM and $this->get_targetbuildsystem) {
+			$target_name = $this->get_targetbuildsystem->NAME;
 		}
 	} else {
 		$class = $this;



View it on GitLab: https://salsa.debian.org/debian/debhelper/commit/aa2b021cc68089efa5e969761eb3b21c74e9d96c

---
View it on GitLab: https://salsa.debian.org/debian/debhelper/commit/aa2b021cc68089efa5e969761eb3b21c74e9d96c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20180408/04274d65/attachment-0001.html>


More information about the debhelper-devel mailing list