Skip to content

Add a NULL check to refineSuites.#10711

Open
kareem-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
kareem-wolfssl:zd21987
Open

Add a NULL check to refineSuites.#10711
kareem-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
kareem-wolfssl:zd21987

Conversation

@kareem-wolfssl

Copy link
Copy Markdown
Contributor

Thanks to xiaoshuai for the report.

Description

Fixes zd#21987

Testing

Built in tests

Checklist

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

@kareem-wolfssl kareem-wolfssl self-assigned this Jun 16, 2026
Copilot AI review requested due to automatic review settings June 16, 2026 23:42
@kareem-wolfssl kareem-wolfssl added the Not For This Release Not for release 5.9.2 label Jun 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to harden refineSuites() against NULL inputs to prevent crashes when refining cipher suite lists during TLS/DTLS negotiation (Fixes zd#21987).

Changes:

  • Add an early NULL check in refineSuites() for sslSuites / peerSuites.
  • Set outSuites->suiteSz = 0 on early exit (when outSuites is non-NULL).

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

Comment thread src/internal.c
Thanks to xiaoshuai for the report.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not For This Release Not for release 5.9.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants