};
static struct boot_condition {
- char reason[64];
- char mode[64];
+ char reason[128];
+ char mode[128];
} bc = { "unknown", "normal" };
static guint sig_id[2] = {0, 0};
SYS_G_LIST_FOREACH(result->props, elem, prop) {
if (MATCH(prop->key, "BootReason"))
- sscanf(prop->value, "%s", config_bc.reason);
+ strncpy(config_bc.reason, prop->value, sizeof(prop->value) - 1);
else if (MATCH(prop->key, "BootMode"))
- sscanf(prop->value, "%s", config_bc.mode);
+ strncpy(config_bc.mode, prop->value, sizeof(prop->value) - 1);
}
if (MATCH(bc.reason, config_bc.reason) && MATCH(bc.mode, config_bc.mode))