commit | f8e71f7d8d9aa49849054304a61659e21287c0cc | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Tue Mar 29 12:12:58 2022 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Tue Mar 29 12:12:58 2022 +0200 |
tree | 8810053638ad7148d0945a4bb3e4907fcddcfb0d | |
parent | 3003c9a9ad0b4c303013bb2af35c9583f0fd107e [diff] [blame] |
yanglint BUGFIX missing NULL check Fixes #1825
diff --git a/tools/lint/common.c b/tools/lint/common.c index b41e4fe..c2e2208 100644 --- a/tools/lint/common.c +++ b/tools/lint/common.c
@@ -520,7 +520,7 @@ lyd_print_all(out, merged_tree, format, options_print); } - for (uint32_t u = 0; u < xpaths->count; ++u) { + for (uint32_t u = 0; xpaths && (u < xpaths->count); ++u) { if (evaluate_xpath(merged_tree, (const char *)xpaths->objs[u])) { goto cleanup; }