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 heap overflow on uri parsing #1185

Merged
merged 3 commits into from
Jan 27, 2025
Merged

Fix heap overflow on uri parsing #1185

merged 3 commits into from
Jan 27, 2025

Conversation

TingDaoK
Copy link
Contributor

Issue #, and/or reason for changes (REQUIRED):

  • After we get the colon position, we try to check the next char in the string, but didn't check against the string length. It's possible to cause a heap overflow

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@TingDaoK TingDaoK marked this pull request as ready for review January 27, 2025 16:14
@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.27%. Comparing base (34013d5) to head (723cac4).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1185      +/-   ##
==========================================
- Coverage   84.27%   84.27%   -0.01%     
==========================================
  Files          57       57              
  Lines        5977     5976       -1     
==========================================
- Hits         5037     5036       -1     
  Misses        940      940              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

source/uri.c Show resolved Hide resolved
@TingDaoK TingDaoK merged commit 5e6c081 into main Jan 27, 2025
56 checks passed
@TingDaoK TingDaoK deleted the heap-overflow-uri branch January 27, 2025 18:00
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.

4 participants