summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-18 21:28:25 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-18 21:28:26 +0000
commit48f5dab721e03a47deeef0af45a993b48687bf88 (patch)
tree28258f09af0c27b1fa36f1e5b4eccf36b4f5a2c8
parent507dba18d8e6c102c69dac1cd83d76d821a6cf2f (diff)
Dgit.pm: Call `confess' when shellquote gets an undef arg
This can happen if a command (eg passed to debugcmd) has an undef argument. This turns an undefined warning into an explicit internal error. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r--Debian/Dgit.pm1
-rw-r--r--debian/changelog5
2 files changed, 5 insertions, 1 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm
index 5e0bbd5..ba1c288 100644
--- a/Debian/Dgit.pm
+++ b/Debian/Dgit.pm
@@ -137,6 +137,7 @@ sub messagequote ($) {
sub shellquote {
my @out;
local $_;
+ defined or confess 'internal error' foreach @_;
foreach my $a (@_) {
$_ = $a;
if (!length || m{[^-=_./:0-9a-z]}i) {
diff --git a/debian/changelog b/debian/changelog
index 4754f17..7c2faac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
dgit (3.6~) unstable; urgency=medium
- *
+ Minor improvements:
+ * Call `confess' to print a stack trace when we pass undef to
+ shellquote (eg as a result of debugcmd). Turns an undefined
+ warning into an explicit internal error.
--