adafruit / Adafruit_DotStar

GNU General Public License v3.0
97 stars 58 forks source link

PIxel buffer over read in MONO mode #11

Closed wizard97 closed 2 years ago

wizard97 commented 7 years ago

Just quickly looking at the code, looks like show() reads past the end of the pixel buffer when in MONO mode. show() assumes the buffer is 3*n bytes long, but update Length() allocates a buffer of n + ((n + 3) / 4) bytes when in MONO mode.

Looking now in the header file, it says not to use MONO mode, but just wanted to make you aware that this needs to be fixed before MONO mode can work.

caternuson commented 2 years ago

Closing for now. The MONO mode is labeled as a DO NOT USE work in place: https://github.com/adafruit/Adafruit_DotStar/blob/9f498af35b2383cc34383689277cd99cac3888ff/Adafruit_DotStar.h#L36