-
Notifications
You must be signed in to change notification settings - Fork 3
Test malloc #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Test malloc #119
Conversation
Coverity Issue - Out-of-bounds accessAllocating insufficient memory for the terminating null of the string. High Impact, CWE-119 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
Coverity Issue - Out-of-bounds accessAllocating insufficient memory for the terminating null of the string. High Impact, CWE-119 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
Coverity Issue - Out-of-bounds accessAllocating insufficient memory for the terminating null of the string. High Impact, CWE-119 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
Coverity Issue - Out-of-bounds accessAllocating insufficient memory for the terminating null of the string. High Impact, CWE-119 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
Coverity Issue - Out-of-bounds accessAllocating insufficient memory for the terminating null of the string. High Impact, CWE-119 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
Coverity Issue - Out-of-bounds accessAllocating insufficient memory for the terminating null of the string. High Impact, CWE-119 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
Coverity Issue - Out-of-bounds accessAllocating insufficient memory for the terminating null of the string. High Impact, CWE-119 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
Coverity Issue - Out-of-bounds accessAllocating insufficient memory for the terminating null of the string. High Impact, CWE-119 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
Coverity Issue - Out-of-bounds accessAllocating insufficient memory for the terminating null of the string. High Impact, CWE-119 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
| @@ -71,7 +71,7 @@ MiracastController::MiracastController(void) | |||
|
|
|||
| MiracastController::~MiracastController() | |||
There was a problem hiding this comment.
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
Miracast/common/MiracastCommon.cpp
Outdated
| if (nullptr != m_g_queue){ | ||
|
|
||
|
|
||
| MIRACASTLOG_TRACE("Queue size", g_async_queue_length(m_g_queue)); |
There was a problem hiding this comment.
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
Miracast/common/MiracastCommon.cpp
Outdated
|
|
||
|
|
||
| // Allocate wrapper and push to queue | ||
| auto* wrapper = new std::shared_ptr<std::vector<char>>(buffer); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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>(); |
There was a problem hiding this comment.
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>(); |
There was a problem hiding this comment.
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>(); |
There was a problem hiding this comment.
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>(); |
There was a problem hiding this comment.
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
No description provided.