Describe the bug
Paho code is crashing while accessing qoss list element in MQTTPacket_send_subscribe().
Connection with MQTTBroker was made with createOption where persistence was set to MQTTCLIENT_PERSISTENCE_DEFAULT.
Then MQTTAsync_subscribe is called with topic value and qos level.
As the persistence is set to MQTTCLIENT_PERSISTENCE_DEFAULT it tries to write the information, As the MQTT version is 5 it only stores topic and other values but not the qoss value. And same while retrieving the command from persistence.
And so in MQTTPacket_send_subscribe() the code crashes as List* qoss points to invalid address
To Reproduce
Create a Async client connection with MQTTAsync_createWithOptions with values MQTTCLIENT_PERSISTENCE_DEFAULT along with MQTTversion 5
Send a async subcribe request with MQTTAsync_subscribe with qos values 1 or 2
Expected behavior
A connack response and successfull subscription of the topic.
Screenshots
Environment (please complete the following information):
OS: windows 10
Version [20H2]
Works Fine with
When using MQTTCLIENT_PERSISTENCE_NONE instead of default it works perfectly fine
Describe the bug Paho code is crashing while accessing qoss list element in MQTTPacket_send_subscribe(). Connection with MQTTBroker was made with createOption where persistence was set to MQTTCLIENT_PERSISTENCE_DEFAULT. Then MQTTAsync_subscribe is called with topic value and qos level. As the persistence is set to MQTTCLIENT_PERSISTENCE_DEFAULT it tries to write the information, As the MQTT version is 5 it only stores topic and other values but not the qoss value. And same while retrieving the command from persistence. And so in MQTTPacket_send_subscribe() the code crashes as List* qoss points to invalid address
To Reproduce Create a Async client connection with MQTTAsync_createWithOptions with values MQTTCLIENT_PERSISTENCE_DEFAULT along with MQTTversion 5
Send a async subcribe request with MQTTAsync_subscribe with qos values 1 or 2
Expected behavior A connack response and successfull subscription of the topic.
Screenshots
Environment (please complete the following information):
Works Fine with When using MQTTCLIENT_PERSISTENCE_NONE instead of default it works perfectly fine