summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-02-01 10:57:43 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-02-03 10:35:17 -0500
commit0786af71b4ef4135cbdbdf64ed53c9f305a42a7e (patch)
treede1e73a4e420d3107fc24e5bc1952872e5d0ff53
parent84214adfd0dc046c247e9359cf25839f89cae682 (diff)
downloadding-libs-0786af71b4ef4135cbdbdf64ed53c9f305a42a7e.tar.gz
ding-libs-0786af71b4ef4135cbdbdf64ed53c9f305a42a7e.tar.xz
ding-libs-0786af71b4ef4135cbdbdf64ed53c9f305a42a7e.zip
Fix array index error
The null-terminator would have been written one byte past the end of the array (and there may have been an extra garbage character in the index before it)
-rw-r--r--ini/ini_config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ini/ini_config.c b/ini/ini_config.c
index 67af11b..f9461a7 100644
--- a/ini/ini_config.c
+++ b/ini/ini_config.c
@@ -1610,7 +1610,7 @@ static char **get_str_cfg_array(struct collection_item *item,
}
else {
strncpy(locsep, sep, 3);
- locsep[4] = '\0';
+ locsep[3] = '\0';
lensep = strlen(locsep) + 1;
}