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

ParamFlowChecker has an int overflow risk #837

Closed
chixuan777 opened this issue Jun 16, 2019 · 2 comments · Fixed by #838
Closed

ParamFlowChecker has an int overflow risk #837

chixuan777 opened this issue Jun 16, 2019 · 2 comments · Fixed by #838
Assignees
Labels
kind/bug Category issues or prs related to bug.

Comments

@chixuan777
Copy link

chixuan777 commented Jun 16, 2019

ParamFlowChecker基于sentinel-parameter-flow-control1.6.1
int toAddCount = (int)((passTime * tokenCount) / (rule.getDurationInSec() * 1000));
这部分代码,如果出现,流量极小(or脉冲),但是tokenCount配置又很大的情况,出现int溢出的问题

@sentinel-bot sentinel-bot changed the title ParamFlowChecker存在int溢出风险 ParamFlowChecker has an int overflow risk Jun 16, 2019
@sentinel-bot
Copy link
Collaborator

Hi @chixuan777, we detect non-English characters in the issue. This comment is an auto translation from @sentinel-bot to help other users to understand this issue.
We encourage you to describe your issue in English which is more friendly to other users.

ParamFlowChecker has an int overflow risk

ParamFlowChecker
int toAddCount = (int)((passTime * tokenCount) / (rule.getDurationInSec() * 1000));
This part of the code, if it occurs, the flow is very small (or pulse), but the tokenCount configuration is very large, the problem of int overflow occurs.

@sczyh30
Copy link
Member

sczyh30 commented Jun 16, 2019

Thanks for reporting! We'll fix it in the next version (maybe 1.6.2).

CST11021 pushed a commit to CST11021/Sentinel that referenced this issue Nov 3, 2021
[RIP-9] Add API_Reference_DefaultMQProducer.md for Java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Category issues or prs related to bug.
Projects
None yet
3 participants