Skip to content
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

Possible segmentation fault in application callback function caused by not properly initialized argument #4

Closed
jpwsutton opened this issue Feb 4, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@jpwsutton
Copy link
Contributor

migrated from Bugzilla #486548
status UNCONFIRMED severity normal in component MQTT-C for 1.2
Reported in version 1.2 on platform PC
Assigned to: Ian Craggs

Original attachment names and IDs:

On 2016-01-26 07:15:05 -0500, Juergen Kosel wrote:

The functions MQTTAsync_removeResponsesAndCommands() and
MQTTAsync_removeResponsesAndCommands() do not initialize the pointer data.message.
So if a on command failure callback tries to use this given pointer,
it has no chance to see that there is no valid message. And then it triggers a
segmentation fault exception.

On 2016-01-26 07:16:37 -0500, Juergen Kosel wrote:

Created attachment 259382
Git commit which fixes this problem

Initialize the message to null pointer

To prevent segmentation fault in application, the message pointer needs
to be initialized.

@icraggs icraggs added the bug label May 31, 2016
icraggs pushed a commit that referenced this issue May 31, 2016
Bug: 486548
@icraggs icraggs added this to the 1.1 milestone May 31, 2016
@icraggs icraggs self-assigned this May 31, 2016
@icraggs
Copy link
Contributor

icraggs commented May 31, 2016

Fix added to the develop branch.

@icraggs icraggs closed this as completed May 31, 2016
@frett27 frett27 mentioned this issue Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants