X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fhost.c;h=b3b8b1882a127eb473663d37df4c512949133927;hb=562a0e6f53f497710939fd7b4d16dd936919245c;hp=f94de5eabc4cbb0db88cc70274dfdc63e9c41dad;hpb=dc8091e7b9eb80b77699ac59de3f39eedef65c04;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/host.c b/src/src/host.c index f94de5eab..b3b8b1882 100644 --- a/src/src/host.c +++ b/src/src/host.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2015 */ +/* Copyright (c) University of Cambridge 1995 - 2016 */ /* See the file NOTICE for conditions of use and distribution. */ /* Functions for finding hosts, either by gethostbyname(), gethostbyaddr(), or @@ -554,7 +554,7 @@ if (sender_helo_name == NULL) show_helo = FALSE; /* If HELO/EHLO was followed by an IP literal, it's messy because of two features of IPv6. Firstly, there's the "IPv6:" prefix (Exim is liberal and doesn't require this, for historical reasons). Secondly, IPv6 addresses may not -be given in canonical form, so we have to canonicize them before comparing. As +be given in canonical form, so we have to canonicalize them before comparing. As it happens, the code works for both IPv4 and IPv6. */ else if (sender_helo_name[0] == '[' && @@ -597,12 +597,12 @@ if (sender_host_name == NULL) sender_fullhost = (sender_helo_name == NULL)? address : string_sprintf("(%s) %s", sender_helo_name, address); - sender_rcvhost = string_cat(NULL, &size, &ptr, address, adlen); + sender_rcvhost = string_catn(NULL, &size, &ptr, address, adlen); if (sender_ident != NULL || show_helo || portptr != NULL) { int firstptr; - sender_rcvhost = string_cat(sender_rcvhost, &size, &ptr, US" (", 2); + sender_rcvhost = string_catn(sender_rcvhost, &size, &ptr, US" (", 2); firstptr = ptr; if (portptr != NULL) @@ -617,7 +617,7 @@ if (sender_host_name == NULL) sender_rcvhost = string_append(sender_rcvhost, &size, &ptr, 2, (firstptr == ptr)? US"ident=" : US" ident=", sender_ident); - sender_rcvhost = string_cat(sender_rcvhost, &size, &ptr, US")", 1); + sender_rcvhost = string_catn(sender_rcvhost, &size, &ptr, US")", 1); } sender_rcvhost[ptr] = 0; /* string_cat() always leaves room */ @@ -1646,7 +1646,7 @@ Returns: OK on success, the answer being placed in the global variable FAIL if no host name can be found DEFER if a temporary error was encountered -The variable host_lookup_msg is set to an empty string on sucess, or to a +The variable host_lookup_msg is set to an empty string on success, or to a reason for the failure otherwise, in a form suitable for tagging onto an error message, and also host_lookup_failed is set TRUE if the lookup failed. If there was a defer, host_lookup_deferred is set TRUE. @@ -2777,17 +2777,15 @@ host which is not the primary hostname. */ last = NULL; /* Indicates that not even the first item is filled yet */ for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS); - rr != NULL; - rr = dns_next_rr(&dnsa, &dnss, RESET_NEXT)) + rr; + rr = dns_next_rr(&dnsa, &dnss, RESET_NEXT)) if (rr->type == ind_type) { int precedence; int weight = 0; /* For SRV records */ int port = PORT_NONE; - uschar *s; /* MUST be unsigned for GETSHORT */ + const uschar * s = rr->data; /* MUST be unsigned for GETSHORT */ uschar data[256]; - if (rr->type != ind_type) continue; - s = rr->data; GETSHORT(precedence, s); /* Pointer s is advanced */ /* For MX records, we use a random "weight" which causes multiple records of @@ -3245,7 +3243,7 @@ while (Ufgets(buffer, 256, stdin) != NULL) else if (Ustrcmp(buffer, "request_dnssec") == 0) request_dnssec = TRUE; else if (Ustrcmp(buffer, "no_request_dnssec") == 0) request_dnssec = FALSE; else if (Ustrcmp(buffer, "require_dnssec") == 0) require_dnssec = TRUE; - else if (Ustrcmp(buffer, "no_reqiret_dnssec") == 0) require_dnssec = FALSE; + else if (Ustrcmp(buffer, "no_require_dnssec") == 0) require_dnssec = FALSE; else if (Ustrcmp(buffer, "test_harness") == 0) running_in_test_harness = !running_in_test_harness; else if (Ustrcmp(buffer, "ipv6") == 0) disable_ipv6 = !disable_ipv6;