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

fix: Stack overflow in some non-English language versions. #4815

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Mar 28, 2024

The modelHasNotes() function allocates a string on the stack that is only long enough to handle the English version of STR_MODEL.

When using a non-English language build where the STR_MODEL string has unicode characters encoded with 2-byte or 3-byte character sequences, the modelHasNotes() function will cause a stack overflow.

@gagarinlg
Copy link
Member

Wow
Sometimes I wonder how many more issues are hiding in the code.
thx for your work!

@pfeerick pfeerick added bug 🪲 Something isn't working house keeping 🧹 Cleanup of code and house keeping labels Mar 28, 2024
@pfeerick pfeerick added this to the 2.10 milestone Mar 28, 2024
@pfeerick pfeerick merged commit a5a1980 into EdgeTX:main Mar 28, 2024
44 checks passed
ThomasKuehne pushed a commit to ThomasKuehne/edgetx that referenced this pull request Apr 5, 2024
@philmoz philmoz deleted the fix-stack-overflow branch June 25, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working house keeping 🧹 Cleanup of code and house keeping
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants