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 ByteValueCounter out of bounds indexing #847

Merged
merged 1 commit into from
Jun 17, 2021
Merged

Fix ByteValueCounter out of bounds indexing #847

merged 1 commit into from
Jun 17, 2021

Conversation

quinnj
Copy link
Member

@quinnj quinnj commented Jun 17, 2021

Fixes #845. The issue here is we were incrementing the ByteValueCounter
counts vector using the byte value itself, which obviously was out of
bounds for the null character '\0'. The solution is pretty simple:
just increment the indexing to ensure we're always inbounds.

Fixes #845. The issue here is we were incrementing the ByteValueCounter
counts vector using the byte value itself, which obviously was out of
bounds for the null character `'\0'`. The solution is pretty simple:
just increment the indexing to ensure we're always inbounds.
@codecov
Copy link

codecov bot commented Jun 17, 2021

Codecov Report

Merging #847 (325e205) into main (ffda8d3) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #847   +/-   ##
=======================================
  Coverage   90.84%   90.84%           
=======================================
  Files           9        9           
  Lines        1845     1845           
=======================================
  Hits         1676     1676           
  Misses        169      169           
Impacted Files Coverage Δ
src/detection.jl 95.89% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ffda8d3...325e205. Read the comment docs.

@quinnj quinnj merged commit c3ef56a into main Jun 17, 2021
@quinnj quinnj deleted the jq/845 branch June 17, 2021 04:25
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.

Reading String with zero byte fails.
1 participant