aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian M. Carlson <sandals@crustytoothpaste.net>2013-09-08 20:54:34 +0000
committerJunio C Hamano <gitster@pobox.com>2013-09-10 08:49:22 -0700
commit6cb0c883052118c35e424af7a311c66be9b366e1 (patch)
tree3d46d0599c9589aab3b3b1ea26c94ab4ad333ccb
parent07b83b5d98a8b7230f3ebafeb4ecf2916c011db9 (diff)
downloadgit-6cb0c883052118c35e424af7a311c66be9b366e1.tar.gz
git-6cb0c883052118c35e424af7a311c66be9b366e1.tar.xz
send-email: don't call methods on undefined values
If SSL verification is enabled in git send-email, we could attempt to call a method on an undefined value if the verification failed, since $smtp would end up being undef. Look up the error string in a way that will produce a helpful error message and not cause further errors. Signed-off-by: Brian M. Carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-send-email.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 216247839..3782c3b0c 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1234,7 +1234,7 @@ X-Mailer: git-send-email $gitversion
if ($smtp->code == 220) {
$smtp = Net::SMTP::SSL->start_SSL($smtp,
ssl_verify_params())
- or die "STARTTLS failed! ".$smtp->message;
+ or die "STARTTLS failed! ".IO::Socket::SSL::errstr();
$smtp_encryption = '';
# Send EHLO again to receive fresh
# supported commands