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

body ID overflow in neu3 protocol #388

Open
tingzhao opened this issue Mar 2, 2022 · 1 comment
Open

body ID overflow in neu3 protocol #388

tingzhao opened this issue Mar 2, 2022 · 1 comment
Assignees

Comments

@tingzhao
Copy link
Contributor

tingzhao commented Mar 2, 2022

Neu3 task protocol uses a double type to encode and decode body IDs in JSON objects. It can cause ID overflow in some situations, especially when the ID is tar encoded. Using double is not safe anyway because the ID type is uint64 and expected to be valid in the positive range of int64 in real applications.

@tingzhao
Copy link
Contributor Author

tingzhao commented Mar 2, 2022

I recommend that when an ID is stored in a JSON object outside of NeuTu/Neu3, it should always be decoded, i.e. using a raw ID. Encoding should be kept inside NeuTu/Neu3 and never exposed because the encoding rules are not stable.

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

3 participants