From 64bb6ba5b96eb1c8d18eb018313d2a5c6c557e4f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 9 Mar 2016 15:56:17 +0000 Subject: [Fix] Do not allow empty IP addresses to be parsed --- src/libutil/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libutil/addr.c') diff --git a/src/libutil/addr.c b/src/libutil/addr.c index 414c48538..2a859252f 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -602,7 +602,7 @@ rspamd_parse_inet_address (rspamd_inet_addr_t **target, /* Not ipv6, so try ip:port */ iplen = end - src; - if (iplen > sizeof (ipbuf)) { + if (iplen > sizeof (ipbuf) || iplen <= 1) { return FALSE; } else { -- cgit v1.2.3