projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6663d2
)
Use g_strndup() instead of strndup() for better portability.
author
Andrej Kacian
<ticho@claws-mail.org>
Fri, 28 Apr 2017 11:38:54 +0000
(13:38 +0200)
committer
Andrej Kacian
<ticho@claws-mail.org>
Fri, 28 Apr 2017 11:38:54 +0000
(13:38 +0200)
Fix by Abhay S. Kushwaha.
src/ssl_manager.c
patch
|
blob
|
history
diff --git
a/src/ssl_manager.c
b/src/ssl_manager.c
index 270f1d7b545a2414b1962039878b004326459d1d..4a7db9d704b96c4a5bb67a4d3ff326684f26bf06 100644
(file)
--- 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;
}