Skip to content

jsonschema: return errors instead of panicking on nil receiver/sub-schema#75

Open
SAY-5 wants to merge 1 commit intogoogle:mainfrom
SAY-5:say5/resolve-nil-schema-74
Open

jsonschema: return errors instead of panicking on nil receiver/sub-schema#75
SAY-5 wants to merge 1 commit intogoogle:mainfrom
SAY-5:say5/resolve-nil-schema-74

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 2, 2026

Fixes #74.

(*Schema).Resolve and the recursive (*resolver).resolve both dereferenced their schema argument without a nil check. The MCP Go SDK and any caller passing a nil *Schema would crash with SIGSEGV at detectDraft instead of getting an error back. Add nil-checks at both entry points and a regression test on Resolve.

…hema

Signed-off-by: SAY-5 <say.apm35@gmail.com>
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.

(*Schema).Resolve panics with SIGSEGV when called on a nil receiver — missing nil-guards on resolver entry points

1 participant