fix: Small getter bug for empty paylods

Manifests only internally. Users are not affected.
This commit is contained in:
Euripedes Rocha Filho
2026-10-01 10:58:39 +02:00
parent 00860ceddc
commit 22d69feaea
+2 -2
View File
@@ -228,14 +228,14 @@ char *mqtt_get_publish_data(uint8_t *buffer, size_t *length)
topiclen = buffer[i++] << 8;
topiclen |= buffer[i++];
if (i + topiclen >= blength) {
if (i + topiclen > blength) {
return NULL;
}
i += topiclen;
if (mqtt_get_qos(buffer) > 0) {
if (i + 2 >= blength) {
if (i + 2 > blength) {
return NULL;
}