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

INTEGER_OVERFLOW in src/hdr_histogram.c #118

Open
VoroninArtemii opened this issue Sep 14, 2023 · 0 comments
Open

INTEGER_OVERFLOW in src/hdr_histogram.c #118

VoroninArtemii opened this issue Sep 14, 2023 · 0 comments

Comments

@VoroninArtemii
Copy link

The array elements are summed in function void hdr_reset_internal_counters(struct hdr_histogram* h). However, both the array elements and the summation variable have the same int64_t data type:

int64_t observed_total_count = 0;

int64_t count_at_index;

And then summation:
observed_total_count += count_at_index;

Also, no overflow checks were found in the function itself.

Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.

Author A. Voronin.

@VoroninArtemii VoroninArtemii changed the title INTEGER_OVERFLOW in 'src/hdr_histogram.c' INTEGER_OVERFLOW in src/hdr_histogram.c Sep 14, 2023
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

1 participant