Skip to content

Fix potential length mismatch in non realloc case in wolfSSL_BIO_set_conn_hostname.#10130

Open
kareem-wolfssl wants to merge 1 commit intowolfSSL:masterfrom
kareem-wolfssl:zd21528
Open

Fix potential length mismatch in non realloc case in wolfSSL_BIO_set_conn_hostname.#10130
kareem-wolfssl wants to merge 1 commit intowolfSSL:masterfrom
kareem-wolfssl:zd21528

Conversation

@kareem-wolfssl
Copy link
Copy Markdown
Contributor

Thanks to Cal Page for the report.

Description

Partially fixes zd#21528

Testing

Built in tests

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@kareem-wolfssl kareem-wolfssl self-assigned this Apr 3, 2026
Copilot AI review requested due to automatic review settings April 3, 2026 23:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adjusts a copy-length calculation to avoid a potential buffer read/length mismatch when resizing b->ip, based on an external report (zd#21528).

Changes:

  • Updates the XMEMCPY length argument when copying tmp into a newly allocated b->ip buffer.
Comments suppressed due to low confidence (1)

src/bio.c:2231

  • The PR title mentions fixing wolfSSL_BIO_set_conn_hostname, but this diff changes wolfSSL_BIO_flush. If the fix is intended for wolfSSL_BIO_set_conn_hostname, the title/description should be updated to match the actual change, or the fix should be moved to the correct function so the PR is traceable to the reported issue.
int wolfSSL_BIO_flush(WOLFSSL_BIO* bio)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…conn_hostname.

Thanks to Cal Page for the report.
Copilot AI review requested due to automatic review settings April 3, 2026 23:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants