Browse Source

mqtt: missing buffer offset

re-apply fix from #2181
resolve #2586
dev
Max Prokhorov 1 year ago
committed by GitHub
parent
commit
4f22960a90
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      code/espurna/mqtt.cpp

+ 1
- 1
code/espurna/mqtt.cpp View File

@ -1229,7 +1229,7 @@ void _mqttOnMessageAsync(char* topic, char* payload, AsyncMqttClientMessagePrope
}
alignas(4) static char buffer[((BufferSize + 3) & ~3) + 4] = {0};
std::copy(payload, payload + len, buffer);
std::copy(payload, payload + len, &buffer[index]);
// Not done yet
if (total != (len + index)) {


Loading…
Cancel
Save