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

SAX::Parser constructors check types (v1.13.x branch) #2530

Merged
merged 1 commit into from May 7, 2022

Conversation

flavorjones
Copy link
Member

@flavorjones flavorjones commented May 7, 2022

What problem is this PR intended to solve?

HTML4::SAX::Parser, HTML4::SAX::ParserContext, XML::SAX::Parser, and XML::SAX::ParserContext now properly check the types of the arguments to their various constructor methods.

Previously, passing arguments of unexpected types might cause a segfault or other less-obvious exceptions.

This is a backport of #2529

Have you included adequate test coverage?

Yes! Added test coverage for these cases.

Does this change affect the behavior of either the C or the Java implementations?

Both the C and Java implementations have been updated to behave identically in this circumstance.

Previously, arguments of the wrong type might cause segfault on CRuby.
@flavorjones flavorjones added topic/security backport labels May 7, 2022
@flavorjones flavorjones added this to the v1.13.x patch releases milestone May 7, 2022
@flavorjones flavorjones changed the base branch from main to v1.13.x May 7, 2022
@flavorjones flavorjones force-pushed the flavorjones-check-parse-memory-types_v1.13.x branch from 9ec9d3b to 83cc451 Compare May 7, 2022
@flavorjones flavorjones merged commit 61b1a39 into v1.13.x May 7, 2022
95 of 96 checks passed
@flavorjones flavorjones deleted the flavorjones-check-parse-memory-types_v1.13.x branch May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport topic/security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant