ignore configuration entries nested under an unknown element

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2018-05-22 09:56:59 +08:00
parent 28c33bf99a
commit 69613d5180

View file

@ -2482,9 +2482,10 @@ static int proc_elem_open(void *varg, UNUSED_ARG(uintptr_t parentinfo), UNUSED_A
break; break;
} }
} }
if ( cfg_subelem == NULL || cfg_subelem->name == NULL ) if ( cfg_subelem == NULL || cfg_subelem->name == NULL ) {
cfgst_push(cfgst, 0, NULL, NULL);
return cfg_error(cfgst, "%s: unknown element", name); return cfg_error(cfgst, "%s: unknown element", name);
else if ( strcmp(cfg_subelem->name, "*") == 0 ) { } else if ( strcmp(cfg_subelem->name, "*") == 0 ) {
/* Push a marker that we are to ignore this part of the DOM tree */ /* Push a marker that we are to ignore this part of the DOM tree */
cfgst_push(cfgst, 0, NULL, NULL); cfgst_push(cfgst, 0, NULL, NULL);
return 1; return 1;