Fri Oct 27 21:54:32 CEST 2006 VMiklos <vmiklos@frugalware.org>
* alpm_parse_config(): add missing sanity checks From: http://darcs.frugalware.org/patches/pacman/20061027195432-e2957-0dcda6bdb2d7516d6a5047185bc14ccdf3fb83fc.patch
This commit is contained in:
parent
3e5401b74d
commit
a4355d8d73
|
@ -1182,7 +1182,12 @@ int alpm_parse_config(char *file, alpm_cb_db_register callback, const char *this
|
|||
|
||||
if(this_section != NULL && strlen(this_section) > 0) {
|
||||
strncpy(section, this_section, min(255, strlen(this_section)));
|
||||
db = _alpm_db_register(section, callback);
|
||||
if(!strcmp(section, "local")) {
|
||||
RET_ERR(PM_ERR_CONF_LOCAL, -1);
|
||||
}
|
||||
if(strcmp(section, "options")) {
|
||||
db = _alpm_db_register(section, callback);
|
||||
}
|
||||
}
|
||||
|
||||
while(fgets(line, PATH_MAX, fp)) {
|
||||
|
|
Loading…
Reference in New Issue