Skip to content

[Coverity CID :191002]Error handling issues in /tests/net/lib/mqtt_pubsub/src/test_mqtt_pubsub.c #13825

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

Closed
mandarcthorat1 opened this issue Feb 27, 2019 · 1 comment
Assignees
Labels
area: Networking Clients area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug

Comments

@mandarcthorat1
Copy link
Contributor

Static code scan issues seen in File: /tests/net/lib/mqtt_pubsub/src/test_mqtt_pubsub.c
Category: Error handling issues
Function: publish_handler
Component: Tests
CID: 191002
Please fix or provide comments to square it off in coverity in the link: https://scan9.coverity.com/reports.htm#v32951/p12996

@mandarcthorat1 mandarcthorat1 added area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix labels Feb 27, 2019
@galak galak added priority: low Low impact/importance bug area: Networking Clients labels Feb 27, 2019
@agross-oss
Copy link
Collaborator

looks like we aren't handing the case where rc == EGAIN. We need to do a 'continue' in that case.

nashif pushed a commit that referenced this issue Mar 9, 2019
If the rc = -EAGAIN from mqtt_read_publich_payload(), it shouldn't be
used in memcpy() since it is a negative value, and instead, it should
try to read again.

Fix: #13825
Coverity-CID: 191002

Signed-off-by: Tedd Ho-Jeong An <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking Clients area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants