mirror of
https://github.com/rizinorg/rizin.git
synced 2026-10-12 02:21:57 +00:00
Fix use after free (#6685)
This commit is contained in:
@@ -795,13 +795,14 @@ static bool cb_timezone(void *user, void *data) {
|
||||
static bool cb_cfgdebug(void *user, void *data) {
|
||||
RzCore *core = (RzCore *)user;
|
||||
RzConfigNode *node = (RzConfigNode *)data;
|
||||
if (!core) {
|
||||
if (!core || !node) {
|
||||
return false;
|
||||
}
|
||||
bool is_debug = node->i_value;
|
||||
if (core->io) {
|
||||
rz_config_set_b(core->config, "io.va", !node->i_value);
|
||||
rz_config_set_b(core->config, "io.va", !is_debug);
|
||||
}
|
||||
if (core->dbg && node->i_value) {
|
||||
if (core->dbg && is_debug) {
|
||||
const char *dbgbackend = rz_config_get(core->config, "dbg.backend");
|
||||
core->bin->is_debugger = true;
|
||||
rz_debug_use(core->dbg, dbgbackend);
|
||||
|
||||
Reference in New Issue
Block a user