karlstav / cava

Cross-platform Audio Visualizer
MIT License
3.92k stars 225 forks source link

Fixed a memory overrun when gradient_count > 8 #539

Closed JeremiasStotter closed 6 months ago

JeremiasStotter commented 6 months ago

When the gradient_count is bigger than 8, cava overruns memory when trying to check the 9th colour, which is out of bounds. To fix this, gradient_count should be checked before validating the gradient colours.