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

Stack corruption in reedSolomon::decode_rs #73

Closed
srcejon opened this issue Apr 21, 2021 · 4 comments
Closed

Stack corruption in reedSolomon::decode_rs #73

srcejon opened this issue Apr 21, 2021 · 4 comments

Comments

@srcejon
Copy link
Contributor

srcejon commented Apr 21, 2021

Hi,

It looks like there is stack corruption in reedSolomon::decode_rs().

It has:

uint8_t omega [nroots];

Then calls computeOmega()

Which does:

omega [nroots] = codeLength;

omega [nroots] is beyond the end of the allocated array (which of course only goes to nroots-1).

@JvanKatwijk
Copy link
Owner

JvanKatwijk commented Apr 22, 2021 via email

@srcejon
Copy link
Contributor Author

srcejon commented Apr 22, 2021

Great - note that in the MacOS patch you just merged. I'd increased the size of the array by 1 as a temporary workaround.

@JvanKatwijk
Copy link
Owner

JvanKatwijk commented Apr 22, 2021 via email

@JvanKatwijk
Copy link
Owner

JvanKatwijk commented Apr 22, 2021 via email

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