1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-26 01:38:54 -05:00

Add fix for config parsing issue in case of another pacman 3.0.X release

This commit is contained in:
Dan McGee 2007-06-26 19:35:00 +00:00
parent 4b00fdeef0
commit 51aeac33e9

View File

@ -940,6 +940,7 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const
} }
_alpm_strtrim(key); _alpm_strtrim(key);
strncpy(origkey, key, min(255, strlen(key))); strncpy(origkey, key, min(255, strlen(key)));
origkey[min(255, strlen(key))] = '\0';
key = _alpm_strtoupper(key); key = _alpm_strtoupper(key);
if(!strlen(section) && strcmp(key, "INCLUDE")) { if(!strlen(section) && strcmp(key, "INCLUDE")) {
RET_ERR(PM_ERR_CONF_DIRECTIVE_OUTSIDE_SECTION, -1); RET_ERR(PM_ERR_CONF_DIRECTIVE_OUTSIDE_SECTION, -1);