git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix three issues highlighted by clang analyser.
[exim.git]
/
src
/
src
/
routers
/
iplookup.c
diff --git
a/src/src/routers/iplookup.c
b/src/src/routers/iplookup.c
index 069c0dda1a333aa873d62e2968099cadc6602514..37280078369af0c2c7cc1b1e5bf3814a43cdecef 100644
(file)
--- a/
src/src/routers/iplookup.c
+++ b/
src/src/routers/iplookup.c
@@
-1,10
+1,8
@@
-/* $Cambridge: exim/src/src/routers/iplookup.c,v 1.8 2006/10/09 14:36:25 ph10 Exp $ */
-
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 200
6
*/
+/* Copyright (c) University of Cambridge 1995 - 200
9
*/
/* See the file NOTICE for conditions of use and distribution. */
/* See the file NOTICE for conditions of use and distribution. */
@@
-144,7
+142,7
@@
iplookup_router_entry(
address_item **addr_succeed) /* put old address here on success */
{
uschar *query = NULL;
address_item **addr_succeed) /* put old address here on success */
{
uschar *query = NULL;
-uschar
reply[256]
;
+uschar
*reply
;
uschar *hostname, *reroute, *domain, *listptr;
uschar host_buffer[256];
host_item *host = store_get(sizeof(host_item));
uschar *hostname, *reroute, *domain, *listptr;
uschar host_buffer[256];
host_item *host = store_get(sizeof(host_item));
@@
-163,6
+161,8
@@
pw = pw;
DEBUG(D_route) debug_printf("%s router called for %s: domain = %s\n",
rblock->name, addr->address, addr->domain);
DEBUG(D_route) debug_printf("%s router called for %s: domain = %s\n",
rblock->name, addr->address, addr->domain);
+reply = store_get(256);
+
/* Build the query string to send. If not explicitly given, a default of
"user@domain user@domain" is used. */
/* Build the query string to send. If not explicitly given, a default of
"user@domain user@domain" is used. */
@@
-378,6
+378,9
@@
new_addr->parent = addr;
copyflag(new_addr, addr, af_propagate);
new_addr->p = addr->p;
copyflag(new_addr, addr, af_propagate);
new_addr->p = addr->p;
+if (addr->child_count == SHRT_MAX)
+ log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s router generated more than %d "
+ "child addresses for <%s>", rblock->name, SHRT_MAX, addr->address);
addr->child_count++;
new_addr->next = *addr_new;
*addr_new = new_addr;
addr->child_count++;
new_addr->next = *addr_new;
*addr_new = new_addr;