mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
Fix ESP32 RCSwitch Dump Stack Smash Protection (#636)
Fixes https://github.com/esphome/issues/issues/366
This commit is contained in:
parent
36f47ade70
commit
4fee9cc039
1 changed files with 1 additions and 1 deletions
|
@ -232,7 +232,7 @@ bool RCSwitchDumper::dump(RemoteReceiveData src) {
|
|||
uint8_t out_nbits;
|
||||
RCSwitchBase *protocol = &rc_switch_protocols[i];
|
||||
if (protocol->decode(src, &out_data, &out_nbits) && out_nbits >= 3) {
|
||||
char buffer[32];
|
||||
char buffer[33];
|
||||
for (uint8_t j = 0; j < out_nbits; j++)
|
||||
buffer[j] = (out_data & (1 << (out_nbits - j - 1))) ? '1' : '0';
|
||||
|
||||
|
|
Loading…
Reference in a new issue