Skip to content

Commit 99379e3

Browse files
committed
Revert "Fix F-1602 MqttEncode_Publish check payload len"
This reverts commit bf7dba8.
1 parent a123e1a commit 99379e3

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

src/mqtt_packet.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,14 +1352,6 @@ int MqttEncode_Publish(byte *tx_buf, int tx_buf_len, MqttPublish *publish,
13521352
return MQTT_TRACE_ERROR(MQTT_CODE_ERROR_OUT_OF_BUFFER);
13531353
}
13541354

1355-
/* When not using a callback, the entire payload must fit in the buffer.
1356-
* Otherwise the header remaining-length would declare more bytes than
1357-
* are actually written, desynchronizing the receiver. */
1358-
if (use_cb == 0 && payload_len > 0 &&
1359-
tx_buf_len < header_len + variable_len + payload_len) {
1360-
return MQTT_TRACE_ERROR(MQTT_CODE_ERROR_OUT_OF_BUFFER);
1361-
}
1362-
13631355
/* Encode variable header */
13641356
tx_payload += MqttEncode_String(tx_payload, publish->topic_name);
13651357
if (publish->qos > MQTT_QOS_0) {

0 commit comments

Comments
 (0)