diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-02-08 12:19:13 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-02-08 12:24:40 +0200 |
commit | fc9b4a184ffb715b476f01f4d6f841c2ea089b74 (patch) | |
tree | 39969f10e98d78b3faff49e19cba642034a557da /src/lua/lua_ip.c | |
parent | d76b69b5fd1e529fe9ab57c2dc3d76c0de957098 (diff) | |
download | rspamd-fc9b4a184ffb715b476f01f4d6f841c2ea089b74.tar.gz rspamd-fc9b4a184ffb715b476f01f4d6f841c2ea089b74.zip |
[Fix] Lua IP from string should be invalid if parsing failed
Diffstat (limited to 'src/lua/lua_ip.c')
-rw-r--r-- | src/lua/lua_ip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lua/lua_ip.c b/src/lua/lua_ip.c index 0ebbf2003..0086e2b7a 100644 --- a/src/lua/lua_ip.c +++ b/src/lua/lua_ip.c @@ -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 { |