Fix thumb-server shut down bug 55/169955/1 accepted/tizen/4.0/unified/20180213.132832 submit/tizen_4.0/20180208.082729 submit/tizen_4.0/20180213.055508
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 12 Feb 2018 08:50:16 +0000 (17:50 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Mon, 12 Feb 2018 08:50:16 +0000 (17:50 +0900)
Change-Id: I34d6fb74ed04712b664e340a726fc998df55c2ce
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
lib/media-util-cynara.c

index 7fb8aaf..2da63b9 100755 (executable)
@@ -166,11 +166,13 @@ int ms_cynara_receive_untrusted_message_thumb(int sockfd, thumbMsg *recv_msg, ms
        memcpy(recv_msg, buf, header_size);
        MS_SAFE_FREE(buf);
 
-       if (strlen(recv_msg->org_path) == 0 || strlen(recv_msg->org_path) >= MAX_FILEPATH_LEN) {
+       /* Can be null (kill server msg) */
+       if (strlen(recv_msg->org_path) >= MAX_FILEPATH_LEN) {
                MSAPI_DBG_ERR("org_path size is invlid[%d]", strlen(recv_msg->org_path));
                return MS_MEDIA_ERR_INVALID_IPC_MESSAGE;
        }
 
+       /* Can be null (raw request case) */
        if (strlen(recv_msg->dst_path) >= MAX_FILEPATH_LEN) {
                MSAPI_DBG_ERR("dst_path size is invlid[%d]", strlen(recv_msg->dst_path));
                return MS_MEDIA_ERR_INVALID_IPC_MESSAGE;