From 9f784e808e9281993fc7ef5f964b2cd36e7bc648 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Tue, 4 Aug 2009 01:02:49 +0200 Subject: [PATCH] Fix bug #70 - crash if client is in nat_ip zone, but does not provide an IP in the INF message. --- src/core/inf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/inf.c b/src/core/inf.c index 163d9da..b9218eb 100644 --- a/src/core/inf.c +++ b/src/core/inf.c @@ -192,7 +192,7 @@ int check_network(struct hub_info* hub, struct hub_user* user, struct adc_messag if (acl_is_ip_nat_override(hub->acl, address)) { char* client_given_ip = adc_msg_get_named_argument(cmd, ADC_INF_FLAG_IPV4_ADDR); - if (strcmp(client_given_ip, "0.0.0.0") != 0) + if (client_given_ip && strcmp(client_given_ip, "0.0.0.0") != 0) { user_set_nat_override(user); adc_msg_remove_named_argument(cmd, ADC_INF_FLAG_IPV6_ADDR);