[Commits] [SCM] claws branch, master, updated. 3.17.3-51-gd92a8ab

ticho at claws-mail.org ticho at claws-mail.org
Sun Jan 27 10:53:08 CET 2019


The branch, master has been updated
       via  d92a8ab188823edb95760c128af3bfc1b7173263 (commit)
      from  f6815a5493265e271665bb92e50816afa17a874e (commit)

Summary of changes:
 src/common/utils.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit d92a8ab188823edb95760c128af3bfc1b7173263
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sun Jan 27 10:50:22 2019 +0100

    Make is_toplvl_domain() aware that TLDs can be longer than 6 characters

diff --git a/src/common/utils.c b/src/common/utils.c
index dbf3fd8..8757567 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -3491,12 +3491,11 @@ static GHashTable *create_domain_tab(void)
 
 static gboolean is_toplvl_domain(GHashTable *tab, const gchar *first, const gchar *last)
 {
-	const gint MAX_LVL_DOM_NAME_LEN = 6;
-	gchar buf[MAX_LVL_DOM_NAME_LEN + 1];
-	const gchar *m = buf + MAX_LVL_DOM_NAME_LEN + 1;
+	gchar buf[BUFFSIZE + 1];
+	const gchar *m = buf + BUFFSIZE + 1;
 	register gchar *p;
 
-	if (last - first > MAX_LVL_DOM_NAME_LEN || first > last)
+	if (last - first > BUFFSIZE || first > last)
 		return FALSE;
 
 	for (p = buf; p < m &&  first < last; *p++ = *first++)

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list