Skip to content

ly_ctx_load_module() issue #2511

@awesomenode

Description

@awesomenode

Hi,

I found that ly_ctx_load_module() crashes with a NULL-pointer dereference in ly_ctx_new_change() when all of the following conditions are met:

  1. The context was created with LY_CTX_ALL_IMPLEMENTED.
  2. The loaded module derives an identity from an imported module - identity derived { base imported:base-type; }.
  3. The imported module contains at least one data node (e.g., a leaf).

Reproduction is attached.

repro.zip

Used libyang 5.4.9

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:bugBug description.status:completedFrom the developer perspective, the issue was solved (bug fixed, question answered,...)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions