diff options
author | David Robillard <d@drobilla.net> | 2016-09-04 15:43:11 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-09-04 15:43:11 -0400 |
commit | c95e0b3250cbe5144546dff53d9b5665988bcce4 (patch) | |
tree | b272210ebc2bdb0bc2c04371bdb96b3d0a058854 | |
parent | c571c9caa83276ec2d12b246510b146a39bc5896 (diff) | |
download | lilv-c95e0b3250cbe5144546dff53d9b5665988bcce4.tar.gz lilv-c95e0b3250cbe5144546dff53d9b5665988bcce4.tar.bz2 lilv-c95e0b3250cbe5144546dff53d9b5665988bcce4.zip |
Fix NULL predicate crash in lilv_world_find_nodes
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | src/world.c | 3 |
2 files changed, 5 insertions, 1 deletions
@@ -4,6 +4,7 @@ lilv (0.22.1) unstable; * Add lilv_state_set_metadata() for adding state banks/comments/etc (based on patch from Hanspeter Portner) * Fix crash when state contains non-POD properties + * Fix crash when NULL predicate is passed to lilv_world_find_nodes() * Fix state file versioning * Unload contained resources when bundle is unloaded * Do not instantiate plugin when data fails to parse @@ -17,7 +18,7 @@ lilv (0.22.1) unstable; * Fix documentation installation * Fix outdated comment references to lilv_uri_to_path() - -- David Robillard <d@drobilla.net> Sat, 27 Aug 2016 09:14:39 -0400 + -- David Robillard <d@drobilla.net> Sun, 04 Sep 2016 15:43:02 -0400 lilv (0.22.0) stable; diff --git a/src/world.c b/src/world.c index 1e51a2d..8760604 100644 --- a/src/world.c +++ b/src/world.c @@ -193,6 +193,9 @@ lilv_world_find_nodes(LilvWorld* world, LILV_ERRORF("Subject `%s' is not a resource\n", sord_node_get_string(subject->node)); return NULL; + } else if (!predicate) { + LILV_ERROR("Missing required predicate\n"); + return NULL; } else if (!lilv_node_is_uri(predicate)) { LILV_ERRORF("Predicate `%s' is not a URI\n", sord_node_get_string(predicate->node)); |