]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Set length accordingly to stipped size.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 13 Mar 2015 13:41:04 +0000 (13:41 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 13 Mar 2015 13:41:04 +0000 (13:41 +0000)
src/libserver/url.c

index 78b16af924c024a4e093d3f7f62646d00adacae2..4b255d85672e3c8da55ac5e25def4ca861503f50 100644 (file)
@@ -1431,6 +1431,7 @@ rspamd_url_parse (struct rspamd_url *uri, gchar *uristring, gsize len,
                /* We have extra data at the end of uri, so we are ignoring it for now */
                p = rspamd_mempool_alloc (pool, end - uristring + 1);
                rspamd_strlcpy (p, uristring, end - uristring + 1);
+               len = end - uristring ;
        }
 
        for (i = 0; i < UF_MAX; i ++) {