Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statically allocate UART Receive buffers #248

Merged
merged 1 commit into from
Sep 19, 2022

Conversation

Max-Plastix
Copy link
Contributor

The existing dynamic UART receive buffer allocation has problematic issues. The malloc() may fail, and the code proceeds with a null buffer. Earlier code failed to free() and ran out of memory.
The current code frees the receive buffer while Rx interrupts are still enabled, causing use-after-free.

For these two fixed-size UART buffers, dynamic allocation is not needed and the code is better served by static allocation.

@Quency-D Quency-D merged commit 2300ef2 into HelTecAutomation:master Sep 19, 2022
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.

None yet

2 participants