commit | 3003c9a9ad0b4c303013bb2af35c9583f0fd107e | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Tue Mar 29 12:10:00 2022 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Tue Mar 29 12:10:00 2022 +0200 |
tree | 28bfd4195b2fdd9efc20320dbcbab8f008f33563 | |
parent | a04107f8bd9c9db5cf8f22ea05ba806eaa1ecc33 [diff] |
printer tree BUGFIX possible invalid memory access
diff --git a/src/printer_tree.c b/src/printer_tree.c index 525e505..b5b9666 100644 --- a/src/printer_tree.c +++ b/src/printer_tree.c
@@ -3974,7 +3974,7 @@ ly_parse_nodeid(&id, &prefix, &prefix_len, &name, &name_len); if (prefix) { mod = ly_resolve_prefix(pmod->mod->ctx, prefix, prefix_len, LY_VALUE_SCHEMA, pmod); - ret = mod->parsed == pmod; + ret = mod ? (mod->parsed == pmod) : 0; } else { ret = 1; }