GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix heap-buffer-overflow in query_string when parsing malformed '%'Fix heap-buffer-overflow in query_string for malformed '%' by shan-tanu-joshi-3010 · Pull Request #1134 · CrowCpp/Crow

Conversation

@shan-tanu-joshi-3010

@shan-tanu-joshi-3010 shan-tanu-joshi-3010 commented Jan 17, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the issue reported in #1126.

Problem:
Malformed percent-encoding (e.g. trailing '%') caused an out-of-bounds
read in the query_string parser.

Fix:
Added bounds checking before decoding percent-encoded sequences to
avoid reading past the buffer.

Testing:

  • Reproduced crash with AddressSanitizer before fix
  • Verified no ASan issues after fix
  • Valid URLs unaffected

Fixes #1126

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@shan-tanu-joshi-3010
Fix heap-buffer-overflow in query_string for malformed '%'
6aa5076
gittiver
gittiver reviewed Jan 18, 2026
View reviewed changes
Comment thread test_fix.cpp Resolved

Uh oh!

There was an error while loading. Please reload this page.

gittiver
gittiver requested changes Jan 19, 2026
View reviewed changes
Comment thread test_fix.cpp Resolved

Uh oh!

There was an error while loading. Please reload this page.

@shan-tanu-joshi-3010
Removed intermediate debug file test_fix.cpp
8347d63
@shan-tanu-joshi-3010

shan-tanu-joshi-3010 commented Jan 19, 2026

Copy link
Copy Markdown
Contributor Author

test_fix has been deleted

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gittiver
gittiver approved these changes Feb 25, 2026
View reviewed changes
@gittiver
gittiver merged commit 6571a06 into CrowCpp:master Feb 25, 2026
gittiver added a commit that referenced this pull request Mar 29, 2026
@gittiver
Merge branch 'master' into v1.3 to get sanitize header fix for new bu…
79728c4
…gfix release

* master: (22 commits)
  fix#1165: sanitize header values to prevent injection and add helloworld_inject example (#1167)
  Handle headers for HTTPMethod::Options
  Fix build on OpenBSD (#1162)
  Enable compiler sanitizers for test builds (Fixes #1137)
  Enable compiler sanitizers for test builds (Fixes #1137)
  Enable compiler sanitizers for test builds (Fixes #1137)
  Feature#1129-CMake Error: ALIAS target "Boost::system" name collision when using vcpkg and FetchContent (#1133)
  Fix heap-buffer-overflow in query_string when parsing malformed '%'Fix heap-buffer-overflow in query_string for malformed '%' (#1134)
  Minor features to crow::json::wvalue (#1143)
  ...

# Conflicts:
#	.github/workflows/build_and_test.yml
gittiver added a commit that referenced this pull request Mar 29, 2026
@gittiver
Merge branch 'master' into v1.3 to get sanitize header fix for new bu…
f8c060c
…gfix release

* master: (22 commits)
  fix#1165: sanitize header values to prevent injection and add helloworld_inject example (#1167)
  Handle headers for HTTPMethod::Options
  Fix build on OpenBSD (#1162)
  Enable compiler sanitizers for test builds (Fixes #1137)
  Enable compiler sanitizers for test builds (Fixes #1137)
  Enable compiler sanitizers for test builds (Fixes #1137)
  Feature#1129-CMake Error: ALIAS target "Boost::system" name collision when using vcpkg and FetchContent (#1133)
  Fix heap-buffer-overflow in query_string when parsing malformed '%'Fix heap-buffer-overflow in query_string for malformed '%' (#1134)
  Minor features to crow::json::wvalue (#1143)
  ...

# Conflicts:
#	.github/workflows/build_and_test.yml
@BrewTestBot BrewTestBot mentioned this pull request Mar 29, 2026
crow 1.3.2 Homebrew/homebrew-core#274906
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gittiver gittiver gittiver approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

heap-overflow (read) via invalid url

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@shan-tanu-joshi-3010 @gittiver
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.