-
Notifications
You must be signed in to change notification settings - Fork 3k
Coverity updates #11551
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
Coverity updates #11551
Conversation
|
One suggestion : instead of Entire msg would be: |
|
@Tharazi97, thank you for your changes. |
drivers/source/FlashIAP.cpp
Outdated
| } | ||
|
|
||
| FlashIAP::FlashIAP() : _page_buf(nullptr) | ||
| FlashIAP::FlashIAP() : _page_buf(nullptr), _flash{nullptr} |
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.
There is another PR already fixing this, see https://github.com/ARMmbed/mbed-os/pull/11494/files
cc @hugueskamba
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.
Removed from PR
Fixes Coverity issue about not initialized members.
Fixes Coverity issue about passing nullptr to memcpy.
Fixes Coverity issue about passing nullptr to memcpy.
Fixes Coverity issue about not initialized members.
|
CI started meanwhile |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
|
Please review, this could go in if approved |
hugueskamba
left a comment
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.
LGTM
| _text_record_size(other._text_record_size) | ||
| { | ||
| memcpy(_text_record, other._text_record, _text_record_size); | ||
| if (_text_record) { |
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.
| if (_text_record) { | |
| if (_text_record != nullptr) { |
| { | ||
| _uri[uri_id_index] = id; | ||
| memcpy(_uri + uri_field_index, uri_field.data(), uri_field.size()); | ||
| if (_uri) { |
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.
| if (_uri) { | |
| if (_uri != nullptr) { |
| _uri_size(other._uri_size) | ||
| { | ||
| memcpy(_uri, other._uri, other._uri_size); | ||
| if (_uri) { |
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.
| if (_uri) { | |
| if (_uri != nullptr) { |
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.
I wouldn't use that to keep consistency with other if statements.
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.
No problem, already approved.
michalpasztamobica
left a comment
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.
OK for the ESP8266Interface part.
|
Because this is 12 days old, going to rerun CI |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
|
I think this is good to be merged ? @adbridge |
Description
Changes to eliminate Coverity warnings.
Added simple initialization.
Added checking for null before using
memcpy().Pull request type
Reviewers
@jamesbeyond @maciejbocianski
Release Notes