* Remove unnecessary null checkers
* Add a checker of the integer range
Change-Id: Ide9a5b13762a4da296f6b87e33bdbc76ccc8d857
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
ASSERT_NOT_NULL(handle);
int ret;
- if (!handle)
- return HAND_GESTURE_ERROR_INVALID_PARAMETER;
if (_gesture_check_privilege() != HAND_GESTURE_ERROR_NONE)
return HAND_GESTURE_ERROR_PERMISSION_DENIED;
ASSERT_NOT_NULL(handle);
int ret;
- if (!handle)
- return HAND_GESTURE_ERROR_INVALID_PARAMETER;
LOGD("handle : %p", handle);
ret = gesture_client_dbus_shutdown(handle->gdbus_connection, &handle->server_monitor_id, &handle->monitor_id);
fseek(xml_file, 0, SEEK_END);
size = ftell(xml_file);
+ if (0 >= size) {
+ LOGE("Fail to get xml file");
+ fclose(xml_file);
+ return GESTURED_ERROR_OPERATION_FAILED;
+ }
rewind(xml_file);
introspection_xml = (char*)calloc(sizeof(char), size);