Skip to content

fix(ffi): validate null pointers before dereferencing in request/resp…#4038

Merged
seanmonstar merged 1 commit into
hyperium:masterfrom
DhruvaD1:fix/ffi-null-check
Mar 16, 2026
Merged

fix(ffi): validate null pointers before dereferencing in request/resp…#4038
seanmonstar merged 1 commit into
hyperium:masterfrom
DhruvaD1:fix/ffi-null-check

Conversation

@DhruvaD1

@DhruvaD1 DhruvaD1 commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Three FFI functions dereference raw pointers before NULL validation, leading to UB when called with NULL handles. Added non_null! checks.

Functions fixed:

  • hyper_request_set_uri_parts
  • hyper_request_headers
  • hyper_response_headers

Closes #4033

@seanmonstar seanmonstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@seanmonstar seanmonstar merged commit 28e73cc into hyperium:master Mar 16, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants