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

When frequently switching the state perop to safeop, PO2SOconfig will be overwritten #862

Open
yuanchanghong opened this issue Sep 29, 2024 · 2 comments

Comments

@yuanchanghong
Copy link

When frequently switching the state perop to safeop, PO2SOconfig will be overwritten。

Due to FMMUunused not being cleared, when FMMUc is greater than the maximum array length of FMMU
Execute the sentence context ->slaveist [slave] FMMU[FMMUc]. LogStart = htoel(*LogAddr);
Causing PO2SOconfig to be overwritten

how can i fix it?thanks!!

@ArthurKetels
Copy link
Contributor

Thanks for your research. There is a problem with not having a check for array bounds of FMMU[]. This needs to be addressed.

However you can not trigger this by switching the state from pre-OP to safe-OP (as many times as you like).

This overflow can only happen when calling ecx_config_map_group() multiple times without first initializing the structs with ecx_config_init().

The best solution would be to return an error when trying to call the mapping function without first calling the init function.

@yuanchanghong
Copy link
Author

thanks, your answer help me solve the problem

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

No branches or pull requests

2 participants