Skip to content

Commit

Permalink
Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free
Browse files Browse the repository at this point in the history
  • Loading branch information
embhorn committed Sep 21, 2021
1 parent 52653a6 commit 84d4b53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mqtt_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,9 @@ static int MqttClient_WaitType(MqttClient *client, void *packet_obj,
/* Determine if we received data for this request */
if ((wait_type == MQTT_PACKET_TYPE_ANY ||
wait_type == packet_type ||
MqttIsPubRespPacket(packet_type) == MqttIsPubRespPacket(wait_type)) &&
(wait_packet_id == 0 || wait_packet_id == packet_id))
(MqttIsPubRespPacket(packet_type) &&
MqttIsPubRespPacket(wait_type))) &&
(wait_packet_id == 0 || wait_packet_id == packet_id))
{
use_packet_obj = packet_obj;
waitMatchFound = 1;
Expand Down

0 comments on commit 84d4b53

Please sign in to comment.