]> source.dussan.org Git - 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:45:15 +0000 (13:45 +0000)
src/libserver/url.c

index 53948ba89379052b9dc4cf38206e8376c14f4793..e43ff37241587e48b1440161103d55627328f1be 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 ++) {