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

Checksum calculation #60

Open
OmSaran opened this issue Dec 13, 2021 · 1 comment
Open

Checksum calculation #60

OmSaran opened this issue Dec 13, 2021 · 1 comment

Comments

@OmSaran
Copy link
Contributor

OmSaran commented Dec 13, 2021

Some issues on checksum calculation

  1. Looks like we are calculating the checksum based on the in-memory contents of op log struct here. When the entry_size value goes beyond the memory boundaries of the structure I think it will be an error (It should ideally point to the next information i.e., fname1).
  2. Null string termination: The string procured needs to be null terminated since the buffer is not guaranteed to be zeroed.

While this does not cause issues if there is no crash, it causes issues when trying to recover from a crashed state.

@OmSaran
Copy link
Contributor Author

OmSaran commented Dec 14, 2021

Attempted a fix here: #62
But I think it might need a few iterations of review before merging.

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

1 participant