diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-09 15:56:17 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-09 15:56:17 +0000 |
commit | 64bb6ba5b96eb1c8d18eb018313d2a5c6c557e4f (patch) | |
tree | dca1d326584ecc66585bf9ae2aabd860b4e3b27a /src/libutil/addr.c | |
parent | 4ea1df99ee9fde46a6e6ea1bd7fdf635cd8be7ca (diff) | |
download | rspamd-64bb6ba5b96eb1c8d18eb018313d2a5c6c557e4f.tar.gz rspamd-64bb6ba5b96eb1c8d18eb018313d2a5c6c557e4f.zip |
[Fix] Do not allow empty IP addresses to be parsed
Diffstat (limited to 'src/libutil/addr.c')
-rw-r--r-- | src/libutil/addr.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |