From the dbus-stub generated code, signal handler should return
TRUE if it handles invocation. Even ret value is error, fix to
return TRUE after handling invocation.
Below is dbus-stub comment about signal handler:
If a signal handler returns %TRUE, it means the signal handler
will handle the invocation and no other signal handlers will
run. If no signal handler handles the invocation, the
%G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the
invocation was handled,
%G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let
other signal handlers run.
NOTE: GLIB related asan heap-buffer-overflow issue is from the
wrong return.
Change-Id: I070c4a3fd12d5421cc52e69e6ada25b2ec772e6f
Suggested-by: Sangjung Woo <sangjung.woo@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
_E("failed to initialize PASS PMQoS of the daemon "
"in dbus callback for a start message\n");
- return FALSE;
+ return TRUE;
}
/**
{
int i, ret = -ENOTSUP;
int max_duration_ms = -1;
- gboolean ret_out = TRUE;
if (!g_pmqos) {
_E("PASS PMQoS is stopped\n");
- ret_out = FALSE;
goto out;
}
if (ret < 0) {
_E("cannot set the PMQoS scenario: "
"%s is not supported\n", name);
- ret_out = FALSE;
goto out_dbus;
}
out_dbus:
g_dbus_method_invocation_return_value(invoc, g_variant_new("(i)", ret));
out:
- return ret_out;
+ return TRUE;
}
/**
if (!g_pmqos) {
_E("PASS PMQoS is stopped\n");
- return FALSE;
+ return TRUE;
}
name = g_dbus_method_invocation_get_method_name(invoc);