From: Vsevolod Stakhov Date: Wed, 9 Mar 2016 15:56:17 +0000 (+0000) Subject: [Fix] Do not allow empty IP addresses to be parsed X-Git-Tag: 1.2.0~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64bb6ba5b96eb1c8d18eb018313d2a5c6c557e4f;p=thirdparty%2Frspamd.git [Fix] Do not allow empty IP addresses to be parsed --- diff --git a/src/libutil/addr.c b/src/libutil/addr.c index 414c485385..2a859252f8 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 {