Return code unchecked during publish

Bug #1007597 reported by Steven Lougheed
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mosquitto
Fix Released
Undecided
Unassigned

Bug Description

In _mosquitto_handle_publish (read_handle.c line 120), the return code from _mosquitto_read_bytes is not saved. The next line attempts to look at the return code and cleanup if the call fails, but this condition can never be met.

OLD:
_mosquitto_read_bytes(&mosq->in_packet, message->msg.payload, message->msg.payloadlen);
NEW
rc = _mosquitto_read_bytes(&mosq->in_packet, message->msg.payload, message->msg.payloadlen);

Revision history for this message
Roger Light (roger.light) wrote :

Thanks for the report, and well spotted. I've commited the change: https://bitbucket.org/oojah/mosquitto/changeset/42b40d98395a

Changed in mosquitto:
milestone: none → 0.16
status: New → Fix Committed
Changed in mosquitto:
milestone: 0.16 → 1.0
Changed in mosquitto:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.