summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-06-26 19:35:00 +0000
committerDan McGee <dan@archlinux.org>2007-06-26 19:35:00 +0000
commit51aeac33e9ab34c926dd9c3371e3d287c7dde9d3 (patch)
tree2d9bc07a5df5adce1afa85f03e7a9f52a4ebf3c3
parent4b00fdeef0607916d4f6442f777b83b4cd4d0f83 (diff)
Add fix for config parsing issue in case of another pacman 3.0.X release
-rw-r--r--lib/libalpm/alpm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 227cd5e9..afb6226b 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -940,6 +940,7 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const
}
_alpm_strtrim(key);
strncpy(origkey, key, min(255, strlen(key)));
+ origkey[min(255, strlen(key))] = '\0';
key = _alpm_strtoupper(key);
if(!strlen(section) && strcmp(key, "INCLUDE")) {
RET_ERR(PM_ERR_CONF_DIRECTIVE_OUTSIDE_SECTION, -1);