From 792ca08bdc8db204968b63c13095bb0e4ab910a8 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 15 Apr 2015 17:07:13 +0100 Subject: Fix url length setup. --- src/libserver/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libserver') diff --git a/src/libserver/url.c b/src/libserver/url.c index 174884e71..19e056c7a 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -999,7 +999,6 @@ rspamd_url_parse (struct rspamd_url *uri, gchar *uristring, gsize len, p = rspamd_mempool_alloc (pool, end - uristring + 1); rspamd_strlcpy (p, uristring, end - uristring + 1); len = end - uristring; - uri->urllen = len; } for (i = 0; i < UF_MAX; i ++) { @@ -1042,6 +1041,7 @@ rspamd_url_parse (struct rspamd_url *uri, gchar *uristring, gsize len, /* Now decode url symbols */ uri->string = p; + uri->urllen = len; rspamd_unescape_uri (uri->string, uri->string, len); rspamd_str_lc (uri->string, uri->protocollen); rspamd_str_lc_utf8 (uri->host, uri->hostlen); -- cgit v1.2.3