Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SEGV when parse with invalid content #1146

Merged
merged 1 commit into from
Nov 17, 2022
Merged

Fix SEGV when parse with invalid content #1146

merged 1 commit into from
Nov 17, 2022

Conversation

ksss
Copy link
Collaborator

@ksss ksss commented Nov 15, 2022

I came across a case that SEGV.
After investigating the minimal code, I found the following

buffer = RBS::Buffer.new(content: 1, name: nil)
RBS::Parser.parse_signature(buffer)

I think it should be validated for String before parsing.

Should validate as string before parse signature
Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

Thanks! 👍

@soutaro soutaro merged commit 2d059bc into ruby:master Nov 17, 2022
@ksss ksss deleted the segv branch November 17, 2022 00:33
@soutaro soutaro added this to the RBS 2.8.0 milestone Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants