Skip to content

Conversation

@preeja33
Copy link
Contributor

No description provided.

@preeja33 preeja33 requested a review from a team as a code owner August 20, 2025 13:09
@CLAassistant
Copy link

CLAassistant commented Aug 20, 2025

CLA assistant check
All committers have signed the CLA.

@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Aug 20, 2025

Coverity Issue - Out-of-bounds access

Allocating insufficient memory for the terminating null of the string.

High Impact, CWE-119
OVERRUN

Issue location

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

@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Aug 20, 2025

Coverity Issue - Out-of-bounds access

Allocating insufficient memory for the terminating null of the string.

High Impact, CWE-119
OVERRUN

Issue location

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

@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Aug 20, 2025

Coverity Issue - Out-of-bounds access

Allocating insufficient memory for the terminating null of the string.

High Impact, CWE-119
OVERRUN

Issue location

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

@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Aug 20, 2025

Coverity Issue - Out-of-bounds access

Allocating insufficient memory for the terminating null of the string.

High Impact, CWE-119
OVERRUN

Issue location

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

@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Aug 20, 2025

Coverity Issue - Out-of-bounds access

Allocating insufficient memory for the terminating null of the string.

High Impact, CWE-119
OVERRUN

Issue location

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

@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Aug 20, 2025

Coverity Issue - Out-of-bounds access

Allocating insufficient memory for the terminating null of the string.

High Impact, CWE-119
OVERRUN

Issue location

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

@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Aug 20, 2025

Coverity Issue - Out-of-bounds access

Allocating insufficient memory for the terminating null of the string.

High Impact, CWE-119
OVERRUN

Issue location

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

@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Aug 20, 2025

Coverity Issue - Out-of-bounds access

Allocating insufficient memory for the terminating null of the string.

High Impact, CWE-119
OVERRUN

Issue location

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

@rdkcmf-jenkins
Copy link
Contributor

rdkcmf-jenkins commented Aug 20, 2025

Coverity Issue - Out-of-bounds access

Allocating insufficient memory for the terminating null of the string.

High Impact, CWE-119
OVERRUN

Issue location

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

@@ -71,7 +71,7 @@ MiracastController::MiracastController(void)

MiracastController::~MiracastController()
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Aug 21, 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 - Uncaught exception

An exception of type "std::regex_error" is thrown but the exception specification "/implicit/noexcept" doesn't allow it to be thrown. This will result in a call to terminate().

Medium Impact, CWE-248
UNCAUGHT_EXCEPT

if (nullptr != m_g_queue){


MIRACASTLOG_TRACE("Queue size", g_async_queue_length(m_g_queue));
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Aug 21, 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 - Extra argument to printf format specifier

This argument was not used by the format string: "g_async_queue_length(this->m_g_queue)".

Low Impact, CWE-685
PRINTF_ARGS



// Allocate wrapper and push to queue
auto* wrapper = new std::shared_ptr<std::vector<char>>(buffer);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Aug 21, 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

"buffer" is passed-by-value as parameter to "std::shared_ptr<std::vector<char, std::allocator > >::shared_ptr(std::shared_ptr<std::vector<char, std::allocator > > const &) /explicit =default/", when it could be moved instead.

Low Impact, CWE-none
COPY_INSTEAD_OF_MOVE

How to fix

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

m_CurrentService = nullptr;
m_miracast_ctrler_obj = nullptr;
m_isServiceInitialized = false;
m_isServiceEnabled = 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 - Data race condition

Accessing "this->m_isServiceEnabled" without holding lock "WPEFramework::Plugin::MiracastServiceImplementation.m_EventMutex". Elsewhere, "WPEFramework::Plugin::MiracastServiceImplementation.m_isServiceEnabled" is written to with "MiracastServiceImplementation.m_EventMutex" held 2 out of 2 times (2 of these accesses strongly imply that it is necessary).

Medium Impact, CWE-366
MISSING_LOCK

/* Make sure the Activated and Deactivated are no longer called before we start cleaning up.. */
mCurrentService->Unregister(&mMiracastServiceNotification);
mCurrentService->Unregister(&mMiracastServiceNotification);
mConfigure = mMiracastServiceImpl->QueryInterface<Exchange::IConfiguration>();
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Aug 28, 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 - Dereference after null check

Passing null pointer "this->mMiracastServiceImpl" to "QueryInterface", which dereferences it.

Medium Impact, CWE-476
FORWARD_NULL

/* Make sure the Activated and Deactivated are no longer called before we start cleaning up.. */
mCurrentService->Unregister(&mMiracastServiceNotification);
mCurrentService->Unregister(&mMiracastServiceNotification);
mConfigure = mMiracastServiceImpl->QueryInterface<Exchange::IConfiguration>();
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Aug 28, 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 - Explicit null dereferenced

Passing null pointer "this->mMiracastServiceImpl" to "QueryInterface", which dereferences it.

Medium Impact, CWE-476
FORWARD_NULL

mCurrentService = nullptr;
}
mCurrentService->Unregister(&mMiracastServiceNotification);
Exchange::IConfiguration* mConfigure1 = mMiracastServiceImpl->QueryInterface<Exchange::IConfiguration>();
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Aug 28, 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 - Dereference after null check

Passing null pointer "this->mMiracastServiceImpl" to "QueryInterface", which dereferences it.

Medium Impact, CWE-476
FORWARD_NULL

mCurrentService = nullptr;
}
mCurrentService->Unregister(&mMiracastServiceNotification);
Exchange::IConfiguration* mConfigure1 = mMiracastServiceImpl->QueryInterface<Exchange::IConfiguration>();
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Aug 28, 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 - Explicit null dereferenced

Passing null pointer "this->mMiracastServiceImpl" to "QueryInterface", which dereferences it.

Medium Impact, CWE-476
FORWARD_NULL

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.

4 participants