From 1151bcff3fd6f16d4fe3ca216e3957c1420d7b54 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 1 Feb 2010 10:57:43 -0500 Subject: 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) --- common/ini/ini_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/ini/ini_config.c b/common/ini/ini_config.c index 67af11bfd..f9461a74e 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; } -- cgit