Add null check for msg_db_select_with_query 90/66090/1
authorKyeonghun Lee <kh9090.lee@samsung.com>
Fri, 15 Apr 2016 06:28:36 +0000 (15:28 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Fri, 15 Apr 2016 06:28:36 +0000 (15:28 +0900)
Change-Id: I2783d704f318dae2e027a8e8aac96765f7b30ee6
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
mapi/msg_storage.cpp

index 1130401..7009a72 100755 (executable)
@@ -867,7 +867,7 @@ EXPORT_API int msg_db_select_with_query(msg_handle_t handle, const char *query,
        CHECK_MSG_SUPPORTED(MSG_TELEPHONY_SMS_FEATURE);
        msg_error_t err = MSG_SUCCESS;
 
-       if (handle == NULL || query == NULL)
+       if (handle == NULL || query == NULL || db_res == NULL || row_count == NULL || col_count == NULL)
                return MSG_ERR_INVALID_PARAMETER;
 
        MsgHandle* pHandle = (MsgHandle*)handle;