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

Possible Memory Corruption #302

Open
shufps opened this issue Aug 17, 2024 · 0 comments · May be fixed by #471
Open

Possible Memory Corruption #302

shufps opened this issue Aug 17, 2024 · 0 comments · May be fixed by #471
Labels
bug Something isn't working

Comments

@shufps
Copy link
Contributor

shufps commented Aug 17, 2024

The hex2bin len parameter takes the destination length that is HASH_SIZE and not the source length.

hex2bin(cJSON_GetArrayItem(merkle_branch, i)->valuestring, new_work->merkle_branches + HASH_SIZE * i, HASH_SIZE * 2);

The last hex string converted overwrites 32 bytes of memory not allocated

@WantClue WantClue added the bug Something isn't working label Aug 17, 2024
mutatrum added a commit to mutatrum/ESP-Miner that referenced this issue Nov 11, 2024
@mutatrum mutatrum linked a pull request Nov 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants