Skip to content

Coverity 1523682: Out-of-bounds access#10905

Merged
maskit merged 1 commit into
apache:masterfrom
maskit:cov_unittests
Dec 8, 2023
Merged

Coverity 1523682: Out-of-bounds access#10905
maskit merged 1 commit into
apache:masterfrom
maskit:cov_unittests

Conversation

@maskit
Copy link
Copy Markdown
Member

@maskit maskit commented Dec 7, 2023

This also fixes cov 1523678 and cov 1523674. If not, we can close them as false positives.

Coverity thinks len will be -1 and it becomes a huge positive number when the tests pass them to memcmp because of type difference (int vs size_t). Since we check len > 0 that can't happen but I changed the type to int64_t because the return type of the encode function is int64_t.

This also fixes cov 1523678 and cov 1523674.
@maskit maskit added the Coverity label Dec 7, 2023
@maskit maskit added this to the 10.0.0 milestone Dec 7, 2023
@maskit maskit self-assigned this Dec 7, 2023
@maskit maskit merged commit d9f09d8 into apache:master Dec 8, 2023
phongn pushed a commit to phongn/trafficserver that referenced this pull request Feb 1, 2024
This also fixes cov 1523678 and cov 1523674.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants