Skip to content

Target Hint array check #14

@kellrott

Description

@kellrott

Trying to fix sifter, and got the error:

goroutine 25 [running]:
github.com/bmeg/jsonschemagraph/graph.GraphSchema.Generate({0x140002b2c00?, 0x14000414000?}, {0x14000596038, 0x4}, 0x1400062c120, 0x0, 0x1400088bef0)
	/Users/ellrott/go/pkg/mod/github.com/bmeg/[email protected]/graph/generate.go:96 +0xf88
github.com/bmeg/sifter/transform.(*graphBuildProcess).Process(0x1400001e750, 0x1400062c120)
	/Users/ellrott/workspaces/sifter/transform/graph_build.go:94 +0x9c
github.com/bmeg/flame.(*FlatMapNode[...]).start.func1()
	/Users/ellrott/go/pkg/mod/github.com/bmeg/[email protected]/flatmap.go:24 +0xd0
created by github.com/bmeg/flame.(*FlatMapNode[...]).start in goroutine 1
	/Users/ellrott/go/pkg/mod/github.com/bmeg/[email protected]/flatmap.go:21 +0x94

Looks like line 96 is

						regex_match := target.TargetHints.RegexMatch[0]

So I think the target hint in the schema file isn't correctly formatted, which causes the regex to miss, which isn't checked before the array is accessed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions