Philip Blundell <pb@???> writes:
>
> I just discovered that (with 1.62) a malformed `receiver_unqualified_nets'
> line causes Exim to dump core. The offending code is this, from
> verify.c:verify_setup_netlist().
>
> char *slash = strchr(s, '/');
> ip_net_item *n = store_malloc(sizeof(ip_net_item));
>
> n->next = NULL;
> *anchor = n;
> anchor = &(n->next);
>
> /* Temporarily terminate the string at the slash, and turn the initial
> address into binary. */
>
> *slash = 0;
> n->size = host_aton(s, n->address);
> *slash = '/';
>
> If the string has no '/' character in it, then `slash' is NULL and *slash
> causes a segmentation fault.
>
> Is this fixed in the latest testing releases?
I think so. The code has been completely reorganised (to allow netlists to be
in an external file), and the code fragment above is now in host_amton(), and
it has a guard for missing '/':
char *slash = strchr(s, '/');
if (slash == NULL) return 0;
/* Temporarily terminate the string at the slash, and turn the initial
address into binary. */
*slash = 0;
size = host_aton(s, address);
*slash = '/';
> If not, Philip, perhaps you
> could put a check in.
Philip is expected back here next Monday.
Chris Thompson Cambridge University Computing Service,
Email: cet1@??? New Museums Site, Cambridge CB2 3QG,
Phone: +44 1223 334715 United Kingdom.