mirror of
https://github.com/wled/WLED.git
synced 2025-07-09 11:56:35 +00:00
Fixing a potential array bounds violation in ESPDMX
DMXESPSerial::write and DMXESPSerial::read could access DMXDataStore[512] - one more than the allocated number of elements (i.e. 0...511].
This commit is contained in:
parent
0a815179a2
commit
8422ffcd19
@ -30,8 +30,8 @@
|
|||||||
bool dmxStarted = false;
|
bool dmxStarted = false;
|
||||||
int sendPin = 2; //default on ESP8266
|
int sendPin = 2; //default on ESP8266
|
||||||
|
|
||||||
//DMX value array and size. Entry 0 will hold startbyte
|
//DMX value array and size. Entry 0 will hold startbyte, so we need 512+1 elements
|
||||||
uint8_t dmxDataStore[dmxMaxChannel] = {};
|
uint8_t dmxDataStore[dmxMaxChannel+1] = {};
|
||||||
int channelSize;
|
int channelSize;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user