Fix svace issue (DEREF_AFTER_NULL) 74/105574/2 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_3.0_mobile accepted/tizen_3.0_tv tizen_3.0.m2 tizen_3.0_tv accepted/tizen/3.0.m2/mobile/20170104.121652 accepted/tizen/3.0.m2/tv/20170104.122356 accepted/tizen/3.0/common/20161219.113805 accepted/tizen/3.0/common/20161221.181322 accepted/tizen/3.0/ivi/20161219.090751 accepted/tizen/3.0/ivi/20161221.011016 accepted/tizen/3.0/mobile/20161219.091630 accepted/tizen/3.0/mobile/20161221.011627 accepted/tizen/3.0/tv/20161219.091018 accepted/tizen/3.0/tv/20161221.010801 submit/tizen_3.0.m2/20170104.093749 submit/tizen_3.0/20161219.052705 submit/tizen_3.0/20161220.100802
authorGilbok Lee <gilbok.lee@samsung.com>
Mon, 19 Dec 2016 04:58:20 +0000 (13:58 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Mon, 19 Dec 2016 05:02:27 +0000 (14:02 +0900)
[Version] 0.1.9
[Profile] Mobile, TV
[Issue Type] Fix Svace issue

Change-Id: Iacd9623483865f8c5bfae41cd05bf256633695d1

packaging/capi-media-video-util.spec
src/video_util.c

index c895775..a1f6fd7 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-video-util
 Summary:    A Video Utility library in Tizen Native API
-Version:    0.1.8
+Version:    0.1.9
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index f433983..6fe67c1 100755 (executable)
@@ -237,8 +237,12 @@ static void __video_util_transcode_completed_cb(int error, void *user_data)
        int error_value = VIDEO_UTIL_ERROR_NONE;
        video_util_s *_handle = (video_util_s *)user_data;
 
-       if ((_handle != NULL) && (_handle->_util_cb != NULL)
-               && (_handle->_util_cb->transcode_completed_cb != NULL)) {
+       if (_handle == NULL) {
+               video_util_error("INVALID_PARAMETER");
+               return;
+       }
+
+       if ((_handle->_util_cb != NULL) && (_handle->_util_cb->transcode_completed_cb != NULL)) {
                error_value = __video_util_error_convert(error);
                _handle->_util_cb->transcode_completed_cb(error_value, _handle->_util_cb->user_data);
        }