[Commits] [SCM] claws branch, master, updated. 3.15.0-43-gc8f81c2

ticho at claws-mail.org ticho at claws-mail.org
Fri Apr 28 13:39:49 CEST 2017


The branch, master has been updated
       via  c8f81c20077ce5d2d3dd3b41065f707ae0ad2596 (commit)
      from  c6663d2c41ee20722d4a9c4dc8ac5b09efc882c3 (commit)

Summary of changes:
 src/ssl_manager.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit c8f81c20077ce5d2d3dd3b41065f707ae0ad2596
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Fri Apr 28 13:38:54 2017 +0200

    Use g_strndup() instead of strndup() for better portability.
    
    Fix by Abhay S. Kushwaha.

diff --git a/src/ssl_manager.c b/src/ssl_manager.c
index 270f1d7..4a7db9d 100644
--- a/src/ssl_manager.c
+++ b/src/ssl_manager.c
@@ -227,8 +227,8 @@ static gboolean get_serverport(const gchar *str, gchar **server, gchar **port)
 			prevpos = pos, pos = strstr(pos+1, ".")) {
 		if (!strcmp(pos, ".cert")) {
 			if (prevpos > str) {
-				*server = strndup(str, prevpos - str);
-				*port = strndup(prevpos+1, pos - prevpos - 1);
+				*server = g_strndup(str, prevpos - str);
+				*port = g_strndup(prevpos+1, pos - prevpos - 1);
 			} else {
 				*server = *port = NULL;
 			}

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list