From 6f4fefbd771008fe2ea9ce5adb2a1a34a744451e Mon Sep 17 00:00:00 2001 From: andrethomas Date: Mon, 10 Sep 2018 18:32:41 +0200 Subject: [PATCH] Fix potential buffer overun for EVENT --- sonoff/xsns_29_mcp230xx.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xsns_29_mcp230xx.ino b/sonoff/xsns_29_mcp230xx.ino index d6683da44..058d6c25c 100644 --- a/sonoff/xsns_29_mcp230xx.ino +++ b/sonoff/xsns_29_mcp230xx.ino @@ -300,7 +300,7 @@ void MCP230xx_CheckForInterrupt(void) { MqttPublishPrefixTopic_P(RESULT_OR_STAT, mqtt_data); } 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)); ExecuteCommand(command, SRC_RULE); }