summaryrefslogtreecommitdiff
path: root/plugins/yaml/line.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/yaml/line.c')
-rw-r--r--plugins/yaml/line.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/yaml/line.c b/plugins/yaml/line.c
index 26a1012..3466bb8 100644
--- a/plugins/yaml/line.c
+++ b/plugins/yaml/line.c
@@ -177,6 +177,7 @@ static void g_yaml_line_finalize(GYamlLine *line)
/******************************************************************************
* *
* Paramètres : raw = contenu brut d'une ligne au format Yaml. *
+* rlen = taille de ce contenu brut. *
* number = indice associé à la ligne. *
* *
* Description : Met en place un gestionnaire pour ligne au format Yaml. *
@@ -187,7 +188,7 @@ static void g_yaml_line_finalize(GYamlLine *line)
* *
******************************************************************************/
-GYamlLine *g_yaml_line_new(const char *raw, size_t number)
+GYamlLine *g_yaml_line_new(const char *raw, size_t rlen, size_t number)
{
GYamlLine *result; /* Structure à retourner */
char *iter; /* Boucle de parcours */
@@ -196,7 +197,7 @@ GYamlLine *g_yaml_line_new(const char *raw, size_t number)
result = g_object_new(G_TYPE_YAML_LINE, NULL);
- result->raw = strdup(raw);
+ result->raw = strndup(raw, rlen);
result->number = number;
/* Indentation */