Skip to content

Conversation

maxgerhardt
Copy link

This code block blindly malloc()s its main framebuffer and optionally a second back buffer, but never checks if it actually got any memory back. This will cause the subseqeuent memset()s calls to crash, in case of memory allocation failure.

This code change handles it more gracefully and also deallocates the main framebuffer in case the main framebuffer could be allocated but the back buffer couldn't be allocated.

Crash with this was observed on a Adafruit Metro RP2350.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant