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 keyword arguments not be obtained with mrb_get_args(); Fix #4754 #4855

Merged
merged 1 commit into from Dec 9, 2019

Conversation

dearblue
Copy link
Contributor

@dearblue dearblue commented Dec 7, 2019

If ":" is after "|" and there is no "?" or "*", the keyword argument could not be obtained and it was not initialized with undef.

For example: "|oo:"


Even before the patch (mruby-2.1.0), ":|o" and "|o*:" etc work without problems.

However, "|oo:" described as an example is not assigned to keyword arguments at all.
Therefore, if the variable is accessed as it is, SIGSEGV will be executed in some cases.

Sorry!

…y#4754

If ":" is after "|" and there is no "?" or "*", the keyword argument
could not be obtained and it was not initialized with `undef`.

For example: "|oo:"
@matz matz merged commit 8267993 into mruby:master Dec 9, 2019
2 checks passed
@dearblue dearblue deleted the kwargs-uninit branch Dec 9, 2019
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.

None yet

2 participants