Skip to content

Commit

Permalink
fix: Allow MQTT v5 zero length payload
Browse files Browse the repository at this point in the history
Merges #250
  • Loading branch information
nebkat authored and david-cermak committed Feb 27, 2023
1 parent 1011e63 commit 65a4fda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mqtt5_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ esp_err_t esp_mqtt5_get_publish_data(esp_mqtt5_client_handle_t client, uint8_t *
uint16_t property_len = 0;
esp_mqtt5_publish_resp_property_t property = {0};
*msg_data = mqtt5_get_publish_property_payload(msg_buf, msg_read_len, msg_topic, msg_topic_len, &property, &property_len, msg_data_len, &client->event.property->user_property);
if (*msg_data_len == 0 || *msg_data == NULL) {
if (*msg_data == NULL) {
ESP_LOGE(TAG, "%s: mqtt5_get_publish_property_payload() failed", __func__);
return ESP_FAIL;
}
Expand Down

0 comments on commit 65a4fda

Please sign in to comment.