From: InHong Han Date: Mon, 16 Sep 2019 05:40:15 +0000 (+0900) Subject: Add missing conditions for checking invalid parameter X-Git-Tag: accepted/tizen/unified/20190927.013247~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F70%2F213870%2F1;p=platform%2Fcore%2Fuifw%2Fcapi-ui-sticker.git Add missing conditions for checking invalid parameter Change-Id: I3605222ad2d641b0f7ae6cf512e36bc5a3275f99 --- diff --git a/provider/sticker_provider.c b/provider/sticker_provider.c index b8c82aa..474c6a9 100644 --- a/provider/sticker_provider.c +++ b/provider/sticker_provider.c @@ -242,7 +242,7 @@ EXPORT_API int sticker_provider_delete_data(sticker_provider_h provider_handle, CHECK_STICKER_FEATURE(); int ret; - if (!provider_handle || (data_handle->sticker_info_id <= 0)) + if (!provider_handle || !data_handle || (data_handle->sticker_info_id <= 0)) return STICKER_ERROR_INVALID_PARAMETER; ret = sticker_dbus_delete_sticker_info(provider_handle->gdbus_connection, data_handle->sticker_info_id); @@ -261,7 +261,7 @@ EXPORT_API int sticker_provider_get_sticker_count(sticker_provider_h provider_ha int ret; char *app_id = NULL; - if (!provider_handle) + if (!provider_handle || !count) return STICKER_ERROR_INVALID_PARAMETER; ret = app_get_id(&app_id);