Routing: in a dnslookup, fix fail_defer_domains to defer on missing MX record. Bug...
[exim.git] / src / src / utf8.c
index a0ec0039199615b32b3390437511ff9021ebab2b..e394db0a8a8e59082dfa3d2d6f4a54696bbd92e8 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "exim.h"
 
-#ifdef EXPERIMENTAL_INTERNATIONAL
+#ifdef SUPPORT_I18N
 
 #include <idna.h>
 #include <punycode.h>
@@ -18,7 +18,7 @@ BOOL
 string_is_utf8(const uschar * s)
 {
 uschar c;
-while ((c = *s++)) if (c & 0x80) return TRUE;
+if (s) while ((c = *s++)) if (c & 0x80) return TRUE;
 return FALSE;
 }
 
@@ -127,7 +127,7 @@ if ((rc = punycode_decode(p_len, CCS alabel+4, &p_len, p, NULL)) != PUNYCODE_SUC
   return NULL;
   }
 
-s = stringprep_ucs4_to_utf8(p, p_len, NULL, &p_len);
+s = US stringprep_ucs4_to_utf8(p, p_len, NULL, &p_len);
 res = string_copyn(s, p_len);
 free(s);
 return res;