fix svace issues 87/75087/1 accepted/tizen/common/20160620.163303 accepted/tizen/ivi/20160620.082455 accepted/tizen/mobile/20160620.082327 accepted/tizen/tv/20160620.082356 accepted/tizen/wearable/20160620.082429 submit/tizen/20160617.072816
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 16 Jun 2016 12:17:07 +0000 (21:17 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 16 Jun 2016 12:17:07 +0000 (21:17 +0900)
Change-Id: I19c163e24b50e325d44eb9ea35b950b38af90d0c

src/player.c

index f97a41d..cec0b12 100644 (file)
@@ -310,7 +310,7 @@ static int player_recv_msg(callback_cb_info_s * cb_info)
                        }
                        memset(buff->recvMsg, 0x00, sizeof(char)*buff->bufLen);
                }
-               sprintf(buff->recvMsg, "%s%s", buff->part_of_msg, tmp);
+               snprintf(buff->recvMsg, buff->bufLen, "%s%s", buff->part_of_msg, tmp);
                recvLen += strlen(buff->part_of_msg);
 
                free(buff->part_of_msg);
@@ -1406,7 +1406,7 @@ int player_destroy(player_h player)
 
        player_msg_send(api, pc, ret_buf, ret);
 #ifdef EVAS_RENDERER_SUPPORT
-       if (EVAS_HANDLE(pc)) {
+       if (CALLBACK_INFO(pc) && EVAS_HANDLE(pc)) {
                player_unset_media_packet_video_frame_decoded_cb(player);
                if (mm_evas_renderer_destroy(&EVAS_HANDLE(pc)) != MM_ERROR_NONE)
                        LOGW("fail to unset evas client");
@@ -1845,6 +1845,10 @@ int player_set_play_position(player_h player, int millisecond, bool accurate, pl
        int pos = millisecond;
 
        LOGD("ENTER");
+       if (!pc->cb_info) {
+               LOGE("cb_info is null");
+               return PLAYER_ERROR_INVALID_OPERATION;
+       }
 
        if ((pc->push_media_stream == FALSE) &&
                (pc->cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_SEEK])) {