diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-20 16:24:22 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-20 16:24:22 +0000 |
commit | 9ac81649d3523ee0c21005029f3f6173473e69d7 (patch) | |
tree | 8884b1dc8c5accaa27aee54f956fc9190c4fb3aa /contrib | |
parent | ef66ecf2243d5b975afd2448cd4c01583e04b2bf (diff) | |
download | rspamd-9ac81649d3523ee0c21005029f3f6173473e69d7.tar.gz rspamd-9ac81649d3523ee0c21005029f3f6173473e69d7.zip |
Another fix to punycode
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/librdns/packet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/librdns/packet.c b/contrib/librdns/packet.c index 6ce3f50fa..c07418604 100644 --- a/contrib/librdns/packet.c +++ b/contrib/librdns/packet.c @@ -129,9 +129,9 @@ rdns_format_dns_name (struct rdns_resolver *resolver, const char *in, } /* We need to encode */ - p = in; - olen = inlen + 1 + sizeof ("xn--") * labels; + /* We allocate 4 times more memory as we cannot guarantee encoding bounds */ + olen = inlen * sizeof (guint32) + 1 + sizeof ("xn--") * labels; *out = malloc (olen + 1); if (*out == NULL) { |