Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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>
  • Loading branch information...
commit 6cb0c883052118c35e424af7a311c66be9b366e1 1 parent 07b83b5
brian m. carlson authored September 08, 2013 gitster committed September 10, 2013

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  git-send-email.perl
2  git-send-email.perl
@@ -1234,7 +1234,7 @@ sub send_message {
1234 1234
 				if ($smtp->code == 220) {
1235 1235
 					$smtp = Net::SMTP::SSL->start_SSL($smtp,
1236 1236
 									  ssl_verify_params())
1237  
-						or die "STARTTLS failed! ".$smtp->message;
  1237
+						or die "STARTTLS failed! ".IO::Socket::SSL::errstr();
1238 1238
 					$smtp_encryption = '';
1239 1239
 					# Send EHLO again to receive fresh
1240 1240
 					# supported commands

0 notes on commit 6cb0c88

Please sign in to comment.
Something went wrong with that request. Please try again.