summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2005-01-09 14:19:48 +0000
committerFrederic Peters <fpeters@entrouvert.com>2005-01-09 14:19:48 +0000
commit5947af84b10542e8c1d24413d105b071c5b663b2 (patch)
treed17d80f84075d2bf04163ea25b201db93e1b69ea
parent39ce94d79f42529d4b6bac0d184245416e3fdb87 (diff)
downloadlasso-5947af84b10542e8c1d24413d105b071c5b663b2.tar.gz
lasso-5947af84b10542e8c1d24413d105b071c5b663b2.tar.xz
lasso-5947af84b10542e8c1d24413d105b071c5b663b2.zip
replaced strncpy calls by g_strlcpy
-rw-r--r--lasso/xml/xml.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c
index 32359d18..7840cd6b 100644
--- a/lasso/xml/xml.c
+++ b/lasso/xml/xml.c
@@ -1175,8 +1175,7 @@ lasso_node_build_query_from_snippets(LassoNode *node)
s = g_string_sized_new(2000);
for (i=0; query_snippets[i].path; i++) {
- memset(path, 0, 100);
- strncpy(path, query_snippets[i].path, 100);
+ g_strlcpy(path, query_snippets[i].path, 100);
v = get_value_by_path(node, path, &xml_snippet);
if (v && xml_snippet.type == SNIPPET_EXTENSION) {
if (s->len)
@@ -1232,8 +1231,7 @@ lasso_node_init_from_query_fields(LassoNode *node, char **query_fields)
char *field_name = query_snippets[j].field_name;
char path[100];
- memset(path, 0, 100);
- strncpy(path, query_snippets[j].path, 100);
+ g_strlcpy(path, query_snippets[j].path, 100);
if (field_name == NULL)
field_name = query_snippets[j].path;