We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
//
//*
Either xpath.MustCompile needs to fail, or xpath.Expr.Select needs to not crash.
$ head -999 go.mod main.go ==> go.mod <== module example.com/m go 1.13 require ( github.com/antchfx/htmlquery v1.1.0 github.com/antchfx/xpath v1.1.0 golang.org/x/net v0.0.0-20191101175033-0deb6923b6d9 ) ==> main.go <== package main import ( "log" "strings" "github.com/antchfx/htmlquery" "github.com/antchfx/xpath" "golang.org/x/net/html" ) func main() { const doc = `` tree, err := html.Parse(strings.NewReader(doc)) if err != nil { log.Fatalf("html parse: %v", err) } exp := xpath.MustCompile(`//`) _ = htmlquery.QuerySelector(tree, exp) } $ go run . panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x6950c1] goroutine 1 [running]: github.com/antchfx/xpath.(*Expr).Select(...) github.com/antchfx/[email protected]/xpath.go:130 github.com/antchfx/htmlquery.QuerySelector(0xc0000ca230, 0x0, 0x0) github.com/antchfx/[email protected]/query.go:70 +0x61 main.main() example.com/m@/main.go:19 +0x10a exit status 2 $
The text was updated successfully, but these errors were encountered:
d50eb4d
No branches or pull requests
Either xpath.MustCompile needs to fail, or xpath.Expr.Select needs to not crash.
The text was updated successfully, but these errors were encountered: