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 segfault due to integer overflow in ratio_color indexing #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tvasenin
Copy link

@tvasenin tvasenin commented Dec 26, 2019

If the x1000 ratio is large enough (in my case it was 671075384),
you can get negative ratio_color index due to the overflow.

This commit avoids potential overflows inside ratio_color() and also
in all places where it is called.

Previous fix (d52abd2, PR #112)
masked the issue instead of fixing it, and didn't address all cases.

If the x1000 ratio is large enough (in my case it was 671075384),
you can get negative ratio_color index due to the overflow.

This commit avoids potential overflows inside ratio_color() and also
in all places where it is called.

Previous fix (commit d52abd2)
masked the issue instead of fixing it, and didn't address all cases.
@tvasenin tvasenin changed the title Fix segfault due to integer overflow in ratio_color indexing (#112) Fix segfault due to integer overflow in ratio_color indexing Dec 26, 2019
@pyroscope pyroscope self-assigned this Dec 26, 2019
@tvasenin
Copy link
Author

@pyroscope Could you pls review and merge this PR?

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

Successfully merging this pull request may close these issues.

None yet

2 participants