Skip to content

Conversation

@yuvaramachandran-gurusamy
Copy link
Contributor

RDKEMW-1017 RDKEMW-1018: Miracast COMRPC with unittest updation

Signed-off-by: yuvaramachandran_gurusamy yuvaramachandran_gurusamy@comcast.com

yuvaramachandran-gurusamy and others added 16 commits June 11, 2025 20:56
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
…nto feature/RDKEMW-1017_1018_miracast_comrpc_support
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
…ssue

Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
…ents API

Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
@yuvaramachandran-gurusamy yuvaramachandran-gurusamy requested a review from a team as a code owner July 1, 2025 10:33
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Jul 1, 2025

Coverity Issue - Variable copied when it could be moved

"teardown_request" is passed-by-value as parameter to "std::__cxx11::basic_string<char, std::char_traits, std::allocator >::basic_string(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const &)", when it could be moved instead.

Low Impact, CWE-none
COPY_INSTEAD_OF_MOVE

How to fix

Use "std::move(""teardown_request"")" instead of "teardown_request".

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
Tests/L1Tests/tests/test_MiracastPlayer.cpp:920

@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Jul 1, 2025

Coverity Issue - String not null terminated

Passing unterminated string "buffer" to "operator =", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]

High Impact, CWE-170
STRING_NULL

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
Tests/L1Tests/tests/test_MiracastPlayer.cpp:922

}
else
{
returnPayload.message = "stopClientConnection received after Launch";
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Logically dead code

Execution cannot reach this statement: "(returnPayload.message) = (...".

Medium Impact, CWE-561
DEADCODE

LOGINFO("Call MiracastPlayerImplementation constructor");
MiracastPlayerImplementation::_instance = this;
MIRACAST::logger_init("MiracastPlayer");
}
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Uninitialized pointer field

Non-static class member "_service" is not initialized in this constructor nor in any functions that it calls.

Medium Impact, CWE-457
UNINIT_CTOR

}
else
{
setEnableInternal(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Waiting while holding a lock

Call to "setEnableInternal" might sleep while holding lock "lck._M_device".

Medium Impact, CWE-667
SLEEP

}
else
{
setEnableInternal(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Waiting while holding a lock

Call to "setEnableInternal" might sleep while holding lock "lock._M_device".

Medium Impact, CWE-667
SLEEP

receivedCSeqNum = parse_received_parser_field_value( temp_buffer , "CSeq: " );
EXPECT_TRUE(temp_buffer.find("TEARDOWN") == 0);
trigger_response = "RTSP/1.0 200 OK\r\nCSeq: " + receivedCSeqNum + "\r\n\r\n";
send_rtsp_msg(client_fd,trigger_response);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Variable copied when it could be moved

"trigger_response" is passed-by-value as parameter to "std::__cxx11::basic_string<char, std::char_traits, std::allocator >::basic_string(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const &)", when it could be moved instead.

Low Impact, CWE-none
COPY_INSTEAD_OF_MOVE

How to fix

Use "std::move(""trigger_response"")" instead of "trigger_response".

rtsp_hldr_msgq_data.state = RTSP_PAUSE_FROM_SINK2SRC;
Plugin::MiracastPlayerImplementation::_instance->m_miracast_rtsp_obj->send_msgto_rtsp_msg_hdler_thread(rtsp_hldr_msgq_data);
recv_rtsp_msg( client_fd , buffer , sizeof(buffer));
temp_buffer = buffer;
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - String not null terminated

Passing unterminated string "buffer" to "operator =", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]

High Impact, CWE-170
STRING_NULL

rtsp_hldr_msgq_data.state = RTSP_PLAY_FROM_SINK2SRC;
Plugin::MiracastPlayerImplementation::_instance->m_miracast_rtsp_obj->send_msgto_rtsp_msg_hdler_thread(rtsp_hldr_msgq_data);
recv_rtsp_msg( client_fd , buffer , sizeof(buffer));
temp_buffer = buffer;
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - String not null terminated

Passing unterminated string "buffer" to "operator =", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]

High Impact, CWE-170
STRING_NULL

rtsp_hldr_msgq_data.state = RTSP_TEARDOWN_FROM_SINK2SRC;
Plugin::MiracastPlayerImplementation::_instance->m_miracast_rtsp_obj->send_msgto_rtsp_msg_hdler_thread(rtsp_hldr_msgq_data);
recv_rtsp_msg( client_fd , buffer , sizeof(buffer));
temp_buffer = buffer;
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - String not null terminated

Passing unterminated string "buffer" to "operator =", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]

High Impact, CWE-170
STRING_NULL


void InitializePowerManager(PluginHost::IShell *service);
void registerEventHandlers();
const void InitializePowerState();
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Parse warning

type qualifier on return type is meaningless

Low Impact, CWE-398
PW.USELESS_TYPE_QUALIFIER_ON_RETURN_TYPE

if ( !is_connect_req_reported )
{
changeServiceState(MIRACAST_SERVICE_STATE_DIRECT_LAUCH_REQUESTED);
m_src_dev_ip = src_dev_ip;
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Variable copied when it could be moved

"src_dev_ip" is copied in call to copy assignment for class "string", when it could be moved instead.

Low Impact, CWE-none
COPY_INSTEAD_OF_MOVE

How to fix

Use "std::move(""src_dev_ip"")" instead of "src_dev_ip".

Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
}
else
{
result.message = "stopClientConnection received after Launch";
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Logically dead code

Execution cannot reach this statement: "(result.message) = ("stopCl...".

Medium Impact, CWE-561
DEADCODE

Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
{
usleep(500000);
TEST_LOG("Send Msg[%lu][%s]...",msg_buffer.size(),msg_buffer.c_str());
send(sockfd, msg_buffer.c_str(), msg_buffer.size(), 0);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Unchecked return value from library

Calling "send(sockfd, msg_buffer->c_str(), msg_buffer->size(), 0)" without checking return value. This library function may fail and return an error code.

Medium Impact, CWE-252
CHECKED_RETURN

{
*bytes_processed_ptr = recv_return;
}
TEST_LOG("recv string [%s][%d] ...",buffer,recv_return);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Invalid type in argument to printf format specifier

Argument "buffer" to format specifier "%s" was expected to have type "char *" but has type "void *".

Medium Impact, CWE-686
PRINTF_ARGS


if ( MIRACAST_SERVICE_STATE_PLAYER_LAUNCHED == current_state )
{
result.message = "stopClientConnection received after Launch";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Logically dead code

Execution cannot reach this statement: "(result.message) = ("stopCl...".

Medium Impact, CWE-561
DEADCODE


if ( MIRACAST_SERVICE_STATE_PLAYER_LAUNCHED == current_state )
{
result.message = "stopClientConnection received after Launch";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Logically dead code

Execution cannot reach this statement: "(result.message) = ("stopCl...".

Medium Impact, CWE-561
DEADCODE

Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
void* buffer = nullptr;
GstBuffer *gstBuffer = nullptr;
self->m_pushBufferLoop = true;
while (self && (self->m_pushBufferLoop))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Dereference before null check

Null-checking "self" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

Medium Impact, CWE-476
REVERSE_INULL

MIRACASTLOG_ERROR("Failed to create MessageQueue");
return false;
}
pthread_create(&m_playback_thread, nullptr, MiracastGstPlayer::playbackThread, this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unchecked return value

Calling "pthread_create" without checking return value (as is done elsewhere 2 out of 2 times).

Medium Impact, CWE-252
CHECKED_RETURN

return false;
}
pthread_create(&m_playback_thread, nullptr, MiracastGstPlayer::playbackThread, this);
pthread_create(&m_pushbuffer_handler_tid, nullptr, MiracastGstPlayer::pushbuffer_handler_thread, this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unchecked return value

Calling "pthread_create" without checking return value (as is done elsewhere 2 out of 2 times).

Medium Impact, CWE-252
CHECKED_RETURN

if (nullptr != buffer)
{
gstBuffer = static_cast<GstBuffer*>(buffer);
MIRACASTLOG_INFO("Received buffer [%x]", gstBuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "gstBuffer" to format specifier "%x" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS


if (nullptr != gstBuffer)
{
MIRACASTLOG_INFO("gstBuffer[%x]",gstBuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "gstBuffer" to format specifier "%x" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS

MIRACASTLOG_INFO("Received buffer [%x]", gstBuffer);
gst_buffer_unref(gstBuffer);
}
gstBuffer = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unused value

Assigning value "NULL" to "gstBuffer" here, but that stored value is overwritten before it can be used.

Low Impact, CWE-563
UNUSED_VALUE

self->m_customQueueHandle->sendData(static_cast<void*>(new_buffer));
}
}
new_buffer = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unused value

Assigning value "NULL" to "new_buffer" here, but that stored value is overwritten before it can be used.

Low Impact, CWE-563
UNUSED_VALUE

new_buffer = gst_buffer_new_allocate(NULL, 128, NULL);
if (new_buffer)
{
MIRACASTLOG_INFO("gstBuffer[%x]",new_buffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "new_buffer" to format specifier "%x" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS

void* buffer = nullptr;
GstBuffer *gstBuffer = nullptr;
self->m_pushBufferLoop = true;
while (self && (self->m_pushBufferLoop))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Dereference before null check

Null-checking "self" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

Medium Impact, CWE-476
REVERSE_INULL

MIRACASTLOG_ERROR("Failed to create MessageQueue");
return false;
}
pthread_create(&m_playback_thread, nullptr, MiracastGstPlayer::playbackThread, this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unchecked return value

Calling "pthread_create" without checking return value (as is done elsewhere 2 out of 2 times).

Medium Impact, CWE-252
CHECKED_RETURN

return false;
}
pthread_create(&m_playback_thread, nullptr, MiracastGstPlayer::playbackThread, this);
pthread_create(&m_pushbuffer_handler_tid, nullptr, MiracastGstPlayer::pushbuffer_handler_thread, this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unchecked return value

Calling "pthread_create" without checking return value (as is done elsewhere 2 out of 2 times).

Medium Impact, CWE-252
CHECKED_RETURN

if (nullptr != buffer)
{
gstBuffer = static_cast<GstBuffer*>(buffer);
MIRACASTLOG_INFO("Received buffer [%x]", gstBuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "gstBuffer" to format specifier "%x" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS


if (nullptr != gstBuffer)
{
MIRACASTLOG_INFO("gstBuffer[%x]",gstBuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "gstBuffer" to format specifier "%x" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS

MIRACASTLOG_INFO("Received buffer [%x]", gstBuffer);
gst_buffer_unref(gstBuffer);
}
gstBuffer = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unused value

Assigning value "NULL" to "gstBuffer" here, but that stored value is overwritten before it can be used.

Low Impact, CWE-563
UNUSED_VALUE

self->m_customQueueHandle->sendData(static_cast<void*>(new_buffer));
}
}
new_buffer = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unused value

Assigning value "NULL" to "new_buffer" here, but that stored value is overwritten before it can be used.

Low Impact, CWE-563
UNUSED_VALUE

new_buffer = gst_buffer_new_allocate(NULL, 128, NULL);
if (new_buffer)
{
MIRACASTLOG_INFO("gstBuffer[%x]",new_buffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "new_buffer" to format specifier "%x" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS

Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
void* buffer = nullptr;
GstBuffer *gstBuffer = nullptr;
self->m_pushBufferLoop = true;
while (self && (self->m_pushBufferLoop))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Dereference before null check

Null-checking "self" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

Medium Impact, CWE-476
REVERSE_INULL

MIRACASTLOG_ERROR("Failed to create MessageQueue");
return false;
}
pthread_create(&m_playback_thread, nullptr, MiracastGstPlayer::playbackThread, this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unchecked return value

Calling "pthread_create" without checking return value (as is done elsewhere 2 out of 2 times).

Medium Impact, CWE-252
CHECKED_RETURN

return false;
}
pthread_create(&m_playback_thread, nullptr, MiracastGstPlayer::playbackThread, this);
pthread_create(&m_pushbuffer_handler_tid, nullptr, MiracastGstPlayer::pushbuffer_handler_thread, this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unchecked return value

Calling "pthread_create" without checking return value (as is done elsewhere 2 out of 2 times).

Medium Impact, CWE-252
CHECKED_RETURN

if (nullptr != buffer)
{
gstBuffer = static_cast<GstBuffer*>(buffer);
MIRACASTLOG_INFO("Received buffer [%x]", gstBuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "gstBuffer" to format specifier "%x" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS


if (nullptr != gstBuffer)
{
MIRACASTLOG_INFO("gstBuffer[%x]",gstBuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "gstBuffer" to format specifier "%x" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS

MIRACASTLOG_INFO("Received buffer [%x]", gstBuffer);
gst_buffer_unref(gstBuffer);
}
gstBuffer = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unused value

Assigning value "NULL" to "gstBuffer" here, but that stored value is overwritten before it can be used.

Low Impact, CWE-563
UNUSED_VALUE

self->m_customQueueHandle->sendData(static_cast<void*>(new_buffer));
}
}
new_buffer = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Unused value

Assigning value "NULL" to "new_buffer" here, but that stored value is overwritten before it can be used.

Low Impact, CWE-563
UNUSED_VALUE

new_buffer = gst_buffer_new_allocate(NULL, 128, NULL);
if (new_buffer)
{
MIRACASTLOG_INFO("gstBuffer[%x]",new_buffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "new_buffer" to format specifier "%x" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS

Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
if (nullptr != buffer)
{
gstBuffer = static_cast<GstBuffer*>(buffer);
MIRACASTLOG_INFO("Received buffer [%u]", gstBuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "gstBuffer" to format specifier "%u" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS


if (nullptr != gstBuffer)
{
MIRACASTLOG_INFO("gstBuffer[%u]",gstBuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "gstBuffer" to format specifier "%u" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS

new_buffer = gst_buffer_new_allocate(NULL, 128, NULL);
if (new_buffer)
{
MIRACASTLOG_INFO("gstBuffer[%u]",new_buffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Invalid type in argument to printf format specifier

Argument "new_buffer" to format specifier "%u" was expected to have type "unsigned int" but has type "GstBuffer *".

Medium Impact, CWE-686
PRINTF_ARGS

Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
Signed-off-by: yuvaramachandran_gurusamy <yuvaramachandran_gurusamy@comcast.com>
}

public:
static Core::ProxyType<Core::IDispatch> Create(MiracastServiceImplementation *miracastServiceImplementation, Event event, JsonObject params)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Big parameter passed by value

Passing parameter params of type "JsonObject" (size 208 bytes) by value, which exceeds the low threshold of 128 bytes.

Low Impact, CWE-398
PASS_BY_VALUE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants