]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Lua IP from string should be invalid if parsing failed 1405/head
authorAndrew Lewis <nerf@judo.za.org>
Wed, 8 Feb 2017 10:19:13 +0000 (12:19 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 8 Feb 2017 10:24:40 +0000 (12:24 +0200)
src/lua/lua_ip.c

index 0ebbf20039eaccdbca6daa3491a6b5cfbb248f4c..0086e2b7a31796845c3a5a58aa3730fecf600cee 100644 (file)
@@ -361,6 +361,7 @@ lua_ip_from_string (lua_State *L)
 
                if (!rspamd_parse_inet_address (&ip->addr, ip_str, 0)) {
                        msg_warn ("cannot parse ip: %s", ip_str);
+                       ip->addr = NULL;
                }
        }
        else {