Thou shalt not trust Adafruit GFX

Especially when using the co-ordinates it generates as a means to access memory.
This commit is contained in:
mrfaptastic 2020-08-14 11:33:20 +01:00
parent b504f6292d
commit db198d7b60
3 changed files with 3 additions and 3 deletions

View file

@ -442,7 +442,7 @@ void RGB64x32MatrixPanel_I2S_DMA::updateMatrixDMABuffer(int16_t x_coord, int16_t
// Check that the co-ordinates are within range, or it'll break everything big time. // Check that the co-ordinates are within range, or it'll break everything big time.
// Valid co-ordinates are from 0 to (MATRIX_XXXX-1) // Valid co-ordinates are from 0 to (MATRIX_XXXX-1)
if ( x_coord >= MATRIX_WIDTH || y_coord >= MATRIX_HEIGHT) { if ( x_coord < 0 || y_coord < 0 || x_coord >= MATRIX_WIDTH || y_coord >= MATRIX_HEIGHT) {
return; return;
} }

View file

@ -10,7 +10,7 @@
"name": "Faptastic", "name": "Faptastic",
"url": "https://github.com/mrfaptastic/" "url": "https://github.com/mrfaptastic/"
}, },
"version": "1.2.1", "version": "1.2.2",
"frameworks": "arduino", "frameworks": "arduino",
"platforms": "esp32", "platforms": "esp32",
"examples": [ "examples": [

View file

@ -1,5 +1,5 @@
name=ESP32 64x32 LED MATRIX HUB75 DMA Display name=ESP32 64x32 LED MATRIX HUB75 DMA Display
version=1.2.1 version=1.2.2
author=Faptastic author=Faptastic
maintainer=Faptastic maintainer=Faptastic
sentence=Experimental DMA based LED Matrix HUB75 Library sentence=Experimental DMA based LED Matrix HUB75 Library