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 #2529

Merged
merged 1 commit into from
May 7, 2022

Conversation

flavorjones
Copy link
Member

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.

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 this to the v1.14.0 milestone May 7, 2022
@flavorjones flavorjones merged commit 0132cc3 into main May 7, 2022
@flavorjones flavorjones deleted the flavorjones-check-parse-memory-types branch May 7, 2022 13:09
@flavorjones flavorjones removed this from the v1.14.0 milestone May 7, 2022
flavorjones added a commit that referenced this pull request May 7, 2022
…emory-types_v1.13.x

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

---

**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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant