Hi, I think there is a 1-byte buffer overflow at src/utils.cpp:324. The array merkle_root is declared with size 65 (valid indices are 0 to 64), but the code writes:
which accesses index 65 and writes where it shouldn't and possibly corrupts some other variable.
Because it seems to attempt to null-terminate after a for loop which correctly uses snprintf(), this line is best removed, because it's well null-terminated anyway.
I also see, not much work is being done on the project, happy to do a PR or take other advice.
Hi, I think there is a 1-byte buffer overflow at
src/utils.cpp:324. The arraymerkle_rootis declared with size 65 (valid indices are 0 to 64), but the code writes:which accesses index 65 and writes where it shouldn't and possibly corrupts some other variable.
Because it seems to attempt to null-terminate after a for loop which correctly uses
snprintf(), this line is best removed, because it's well null-terminated anyway.I also see, not much work is being done on the project, happy to do a PR or take other advice.