BUGFIX: forced-fail smtp option tls_sni would dereference NULL
authorPhil Pennock <pdp@exim.org>
Wed, 6 Jun 2012 23:51:44 +0000 (19:51 -0400)
committerPhil Pennock <pdp@exim.org>
Wed, 6 Jun 2012 23:51:44 +0000 (19:51 -0400)
doc/doc-txt/ChangeLog
src/src/tls-openssl.c

index 71d2392..66fb1ca 100644 (file)
@@ -37,6 +37,9 @@ JH/01 Bugzilla 1201 & 304 - New cutthrough-delivery feature, with TLS support.
 
 JH/02 Support "G" suffix to numbers in ${if comparisons.
 
+PP/08 Handle smtp transport tls_sni option forced-fail for OpenSSL.
+
+
 Exim version 4.80
 -----------------
 
index a8a62fe..64aa689 100644 (file)
@@ -1338,7 +1338,11 @@ if (sni)
   {
   if (!expand_check(sni, US"tls_sni", &tls_out.sni))
     return FAIL;
-  if (!Ustrlen(tls_out.sni))
+  if (tls_out.sni == NULL)
+    {
+    DEBUG(D_tls) debug_printf("Setting TLS SNI forced to fail, not sending\n");
+    }
+  else if (!Ustrlen(tls_out.sni))
     tls_out.sni = NULL;
   else
     {