From 0786af71b4ef4135cbdbdf64ed53c9f305a42a7e 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) --- ini/ini_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ini') 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; } -- cgit