mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-26 20:26:32 +00:00
Merge pull request #3752 from andrethomas/development
MCP230xx - Fix potential buffer overun for EVENT
This commit is contained in:
commit
1085e218a6
@ -300,7 +300,7 @@ void MCP230xx_CheckForInterrupt(void) {
|
|||||||
MqttPublishPrefixTopic_P(RESULT_OR_STAT, mqtt_data);
|
MqttPublishPrefixTopic_P(RESULT_OR_STAT, mqtt_data);
|
||||||
}
|
}
|
||||||
if (int_event) {
|
if (int_event) {
|
||||||
char command[18];
|
char command[19]; // Theoretical max = 'event MCPINT_D16=1' so 18 + 1 (for the \n)
|
||||||
sprintf(command,"event MCPINT_D%i=%i",intp+(mcp230xx_port*8),((mcp230xx_intcap >> intp) & 0x01));
|
sprintf(command,"event MCPINT_D%i=%i",intp+(mcp230xx_port*8),((mcp230xx_intcap >> intp) & 0x01));
|
||||||
ExecuteCommand(command, SRC_RULE);
|
ExecuteCommand(command, SRC_RULE);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user