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 segfault when invoking custom XPath function without arguments #605

Merged
merged 1 commit into from
Jan 30, 2012

Conversation

waj
Copy link
Contributor

@waj waj commented Jan 30, 2012

Currently this produces a segmentation fault:

x = Nokogiri::XML('<root/>')
ctx = Class.new {
  def foo(x)
    "FOO"
  end
}.new

x.xpath('foo(x)', ctx)

The problem seems to be in ruby_funcall function that tries to initalize the arguments without checking.

tenderlove added a commit that referenced this pull request Jan 30, 2012
Fix segfault when invoking custom XPath function without arguments
@tenderlove tenderlove merged commit 690bb0f into sparklemotion:master Jan 30, 2012
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.

2 participants