summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Herlant <herlantj@gmail.com>2018-09-09 21:03:28 -0700
committerJoseph Herlant <herlantj@gmail.com>2018-09-09 21:03:28 -0700
commitab3ea10d69a4ab1989a31b0b2d02dd91a84a3357 (patch)
treeadb4ae60098c8e1dd21d9484725eb04f4fc0a7d7
parent309cc41973dac7a1ad5137450b105889802b5083 (diff)
downloadnavit-aerostitch/coord_strcmp.tar.gz
cleanup:coord:Move from strncpy to g_strlcpyaerostitch/coord_strcmp
-rw-r--r--navit/coord.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/navit/coord.c b/navit/coord.c
index a0ad12ffe..bb16978c8 100644
--- a/navit/coord.c
+++ b/navit/coord.c
@@ -157,8 +157,7 @@ int coord_parse(const char *coord_input, enum projection output_projection, stru
co=strchr(str,':');
if (co && co < s) {
proj=g_malloc(co-str+1);
- strncpy(proj, str, co-str);
- proj[co-str]='\0';
+ g_strlcpy(proj, str, 1+co-str);
dbg(lvl_debug,"projection=%s", proj);
str=co+1;
s=strchr(str,' ');