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

[libyang]Add a void null pointer dereference. #2199

Closed
wants to merge 1 commit into from

Conversation

13935000463
Copy link

The eval_name_test_with_predicate_get_scnode function is modified. The non-null judgment of node->schema is added to avoid null pointer dereference.

Copy link
Member

@michalvasko michalvasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, lyd_node_schema() function should be used at all the places instead of direct dereference to avoid similar issues. Also, we only accept PRs to the devel branch. If you want, I can fix this issue properly but if you update it according to what I said, I will merge it.

@13935000463
Copy link
Author

Actually, lyd_node_schema() function should be used at all the places instead of direct dereference to avoid similar issues. Also, we only accept PRs to the devel branch. If you want, I can fix this issue properly but if you update it according to what I said, I will merge it.

The node input parameter is used in the lyd_opaq_node scenario.I have a possibility that the schema here will be empty in the actual usage scenario, causing a reset. I hope to merge it, thank you very much.

michalvasko added a commit that referenced this pull request Mar 8, 2024
@michalvasko
Copy link
Member

My main point was that your fix was not a proper one, there were still other cases when an opaque node would cause a crash. I have committed what should be a full fix.

@michalvasko michalvasko closed this Mar 8, 2024
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.

None yet

2 participants