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

No limit on input numbers #1

Open
Istarnion opened this issue May 19, 2021 · 2 comments
Open

No limit on input numbers #1

Istarnion opened this issue May 19, 2021 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@Istarnion
Copy link
Owner

Currently the parser has no limit on numbers in expressions, leaving us vulnerable to overflows and attacks that aim to exhaust all memory.
I don't deem it realistic to want more than 100k dice in a throw nor modifier, so I think that is a sensible cap.

Also consider using 64-bit integers for summing the result. Alternatively, report overflows as errors nicely.

@Istarnion Istarnion self-assigned this May 19, 2021
@Istarnion Istarnion added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels May 19, 2021
@herrozerro
Copy link

Would you take a PR for this?

@Istarnion
Copy link
Owner Author

Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants