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

Fix issue #5029 - infinite loop due to insufficient bounds checking #5041

Merged
merged 1 commit into from
Dec 14, 2017

Conversation

jcopperfield
Copy link
Contributor

@jcopperfield jcopperfield commented Dec 14, 2017

While generating the time axis, a negative stepSize will result in an infinite loop.
A negative stepSize could be generated by determineStepSize when the capacity argument is also negative. This PR will have getLabelCapacity always return a positive capacity and clean up a previous check in determineStepSize.

fiddle https://jsfiddle.net/aLk05ptk/10/

Fixes #5029

 - infinite loop in generating time axis, due to insufficient bounds checking.
Copy link
Member

@simonbrunel simonbrunel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jcopperfield

@etimberg etimberg merged commit f9beedb into chartjs:master Dec 14, 2017
@etimberg etimberg added this to the Version 2.8 milestone Dec 14, 2017
@jcopperfield jcopperfield deleted the PR-20171214-5029 branch December 14, 2017 17:02
yofreke pushed a commit to yofreke/Chart.js that referenced this pull request Dec 30, 2017
- infinite loop in generating time axis, due to insufficient bounds checking.
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
- infinite loop in generating time axis, due to insufficient bounds checking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants