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

Config memory location can get overwritten in certain conditions #14

Closed
neilenns opened this issue Sep 6, 2021 · 1 comment
Closed
Assignees
Labels
bug Something isn't working Code cleanup Changes that clean up unused libraries, memory issues, etc. but do not change functionality.

Comments

@neilenns
Copy link
Contributor

neilenns commented Sep 6, 2021

From @elral

Within readConfig() readBuffer[MEM_LEN_CONFIG + 1] is defined and a RAM area is reserved. Then the config (String cfg) is copied to readBuffer[].
In the nexr steps readBuffer[] is processed, all "." and ":" are exchanged to NULL (string termination) and for each device pointers are defined which are pointing to this reserved RAM area.
At the end of the function readBuffer[] this RAM area is released, but the pointer are sstill pointing to this RAM area.
In the following program it can happen, that additional RAM is required and that the remaining RAM area is not sufficient. In this case the released RAM area from readConfig[] is used and the config is mixed up.

@neilenns neilenns linked a pull request Sep 6, 2021 that will close this issue
@neilenns neilenns added this to Review in progress in Initial migration Oct 8, 2021
@neilenns neilenns mentioned this issue Oct 12, 2021
@neilenns neilenns added bug Something isn't working Code cleanup Changes that clean up unused libraries, memory issues, etc. but do not change functionality. labels Oct 14, 2021
@neilenns neilenns added this to In progress in Code cleanup Oct 17, 2021
@neilenns neilenns removed this from Review in progress in Initial migration Oct 17, 2021
@neilenns neilenns moved this from In progress to Review in progress in Code cleanup Oct 17, 2021
@neilenns
Copy link
Contributor Author

Fixed by #45

Code cleanup automation moved this from Review in progress to Done Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Code cleanup Changes that clean up unused libraries, memory issues, etc. but do not change functionality.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants