The default configuration arrays default_auto_connect and
default_blacklist must be static-qualified. Otherwise, their
stack-allocated storage will go out of scope after parse_config
is finished and empty or commented-out DefaultAutoConnectTechnologies
or NetworkInterfaceBlacklist config entries will refer to
random stack data.
char **interfaces;
char **str_list;
gsize len;
- char *default_auto_connect[] = {
+ static char *default_auto_connect[] = {
"wifi",
"ethernet",
"cellular",
NULL
};
- char *default_blacklist[] = {
+ static char *default_blacklist[] = {
"vmnet",
"vboxnet",
"virbr",