Skip to content

Commit

Permalink
SparkFunDMX fix for possible array bounds violation in DMX.write
Browse files Browse the repository at this point in the history
Align with code in espdmx.cpp
  • Loading branch information
softhack007 authored Nov 21, 2024
1 parent 89d587e commit 548736f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wled00/src/dependencies/dmx/SparkFunDMX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ static const int enablePin = -1; // disable the enable pin because it is not ne
static const int rxPin = -1; // disable the receiving pin because it is not needed - softhack007: Pin=-1 means "use default" not "disable"
static const int txPin = 2; // transmit DMX data over this pin (default is pin 2)

//DMX value array and size. Entry 0 will hold startbyte
static uint8_t dmxData[dmxMaxChannel] = { 0 };
//DMX value array and size. Entry 0 will hold startbyte, so we need 512+1 elements
static uint8_t dmxData[dmxMaxChannel+1] = { 0 };
static int chanSize = 0;
#if !defined(DMX_SEND_ONLY)
static int currentChannel = 0;
Expand Down

0 comments on commit 548736f

Please sign in to comment.