Fix ModbusBridge buffer overflow (#16979)

This commit is contained in:
Norbert Richter 2022-11-06 12:32:02 +01:00
parent f76bed338b
commit 050f2e7e61
No known key found for this signature in database
GPG Key ID: 6628701A626FA674
2 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- Deduplicate code and fix %timer n% rule regression from v12.2.0 (#16914)
- Serial initialization for baudrate and config (#16970)
- ModbusBridge buffer overflow (#16979)
### Removed
- Define ``USE_PN532_DATA_RAW`` from NFC reader (#16939)

View File

@ -258,7 +258,7 @@ void ModbusBridgeHandle(void)
WiFiClient &client = modbusBridgeTCP.client_tcp[i];
if (client)
{
uint8_t header[8];
uint8_t header[9];
uint8_t nrOfBytes = 8;
header[0] = modbusBridgeTCP.tcp_transaction_id >> 8;
header[1] = modbusBridgeTCP.tcp_transaction_id;