summaryrefslogtreecommitdiffstats
path: root/common/ini/ini_config.c
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
commit1151bcff3fd6f16d4fe3ca216e3957c1420d7b54 (patch)
treea8fe1f1d16792b0a6b1e8ceda481060ffc7148d3 /common/ini/ini_config.c
parentb344ede07b51be4f4dcc44c1402eed0ccacc7d6d (diff)
downloadsssd2-1151bcff3fd6f16d4fe3ca216e3957c1420d7b54.tar.gz
sssd2-1151bcff3fd6f16d4fe3ca216e3957c1420d7b54.tar.xz
sssd2-1151bcff3fd6f16d4fe3ca216e3957c1420d7b54.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)
Diffstat (limited to 'common/ini/ini_config.c')
-rw-r--r--common/ini/ini_config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/ini/ini_config.c b/common/ini/ini_config.c
index 67af11bf..f9461a74 100644
--- a/common/ini/ini_config.c
+++ b/common/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;
}