- Casting smaller size variable to bigger size variable can lead to
out-of-bounds memory access when dereferenced.
Change-Id: I89c26b3290a4159ac8f7c9932e0bd77d7928709e
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
{
GError *error = NULL;
int return_code = 0;
- bool _global;
+ gboolean _global;
- if (!alarm_manager_call_alarm_get_global_sync((AlarmManager *)context.proxy, alarm_id, (gboolean *)&_global, &return_code, NULL, &error)) {
+ if (!alarm_manager_call_alarm_get_global_sync((AlarmManager *)context.proxy, alarm_id, &_global, &return_code, NULL, &error)) {
/*g_dbus_proxy_call_sync error */
/*error_code should be set */
ALARM_MGR_EXCEPTION_PRINT("alarm_manager_call_alarm_get_global_sync() failed by dbus. return_code[%d]", return_code);
return false;
}
- *global = _global;
+ *global = (bool)_global;
return true;
}