From fc9b4a184ffb715b476f01f4d6f841c2ea089b74 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Wed, 8 Feb 2017 12:19:13 +0200 Subject: [PATCH] [Fix] Lua IP from string should be invalid if parsing failed --- src/lua/lua_ip.c | 1 + 1 file changed, 1 insertion(+) 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 { -- 2.39.5