Skip to content

ssl: fix string comparison in SSLContext#{min,max}version= - #1160

Open
rhenium wants to merge 1 commit into
ruby:masterfrom
rhenium:ky/ssl-minmax-version-fix-matching
Open

rhenium wants to merge 1 commit into
ruby:masterfrom
rhenium:ky/ssl-minmax-version-fix-matching

Conversation

@rhenium

@rhenium rhenium commented Nov 19, 2026

Copy link
Copy Markdown
Member

The strncmp() incorrectly accepts truncated strings or strings containing embedded NUL bytes. Check that the string lengths match before comparing the contents.

Fixes #1158

The strncmp() incorrectly accepts truncated strings or strings
containing embedded NUL bytes. Check that the string lengths match
before comparing the contents.

Fixes ruby#1158

Co-authored-by: Kazuki Yamaguchi <k@rhe.jp>
@rhenium

rhenium commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

@VersaNexusIX It looks like GitHub associated the commit with a different user. Please let me know what name and email address I should use for the commit author.

This branch has not been deployed

No deployments
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.

SSLContext#min_version= and #max_version= silently accept prefix strings and empty strings

2 participants