diff options
-rw-r--r-- | lib/libalpm/alpm.c | 1 |
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); |