Skip to content

Fix NULL pointer dereference in ucl_schema_validate#372

Open
MarkLee131 wants to merge 1 commit intovstakhov:masterfrom
MarkLee131:fix/schema-null-deref
Open

Fix NULL pointer dereference in ucl_schema_validate#372
MarkLee131 wants to merge 1 commit intovstakhov:masterfrom
MarkLee131:fix/schema-null-deref

Conversation

@MarkLee131
Copy link
Copy Markdown
Contributor

Fix #369:

ucl_object_validate() accepts NULL for the err parameter, but ucl_schema_validate() writes to err->code without a NULL check at two locations (after anyOf and not succeed). The rest of the file uses ucl_schema_create_error() which does guard against NULL. Add the missing guards.

ucl_object_validate() accepts NULL for the err parameter, but
ucl_schema_validate() writes to err->code without a NULL check at
two locations (after anyOf and not succeed). The rest of the file
uses ucl_schema_create_error() which does guard against NULL.
Add the missing guards.
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.

[BUG] NULL pointer dereference in ucl_schema_validate when err parameter is NULL

1 participant