rpi-ws281x / rpi-ws281x-python

Python library wrapping for the rpi-ws281x library
BSD 2-Clause "Simplified" License
323 stars 103 forks source link

no range checks, reading and writing pixels #74

Closed mirronelli closed 1 year ago

mirronelli commented 2 years ago

The get/set Pixel methods do not perform any range checks. Especially the very Pythonesque -1 index, which would normally return the last pixel in the strip, returns totally bogus data from who knows where in the memory. I suggest to add at least some boundary checks so that someone does not override his memory without knowing.