diff options
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | bindings/python/conf.py | 6 | ||||
-rw-r--r-- | bindings/python/lilv.py | 2 | ||||
-rw-r--r-- | doc/lv2apply.1 | 4 | ||||
-rw-r--r-- | doc/lv2bench.1 | 4 | ||||
-rw-r--r-- | doc/lv2info.1 | 4 | ||||
-rw-r--r-- | doc/lv2ls.1 | 4 | ||||
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | src/lilv_config.h | 4 | ||||
-rw-r--r-- | src/state.c | 14 | ||||
-rw-r--r-- | test/test_state.c | 13 |
11 files changed, 44 insertions, 21 deletions
@@ -1,3 +1,9 @@ +lilv (0.24.23) unstable; urgency=medium + + * Fix null dereference when trying to load state from a missing file + + -- David Robillard <d@drobilla.net> Tue, 09 Jan 2024 22:24:29 +0000 + lilv (0.24.22) stable; urgency=medium * Allow LILV_API to be defined by the user diff --git a/bindings/python/conf.py b/bindings/python/conf.py index 736cb79..64252ed 100644 --- a/bindings/python/conf.py +++ b/bindings/python/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2016-2022 David Robillard <d@drobilla.net> +# Copyright 2016-2024 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC # @@ -60,9 +60,9 @@ copyright = u'2016, David Robillard' # built documents. # # The short X.Y version. -version = '0.24.22' +version = '0.24.23' # The full version, including alpha/beta/rc tags. -release = '0.24.22' +release = '0.24.23' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/bindings/python/lilv.py b/bindings/python/lilv.py index a8dcfec..ac0c46e 100644 --- a/bindings/python/lilv.py +++ b/bindings/python/lilv.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: ISC __author__ = "David Robillard" -__copyright__ = "Copyright 2016-2022 David Robillard" +__copyright__ = "Copyright 2016-2024 David Robillard" __license__ = "ISC" __version__ = "0.24.22" __maintainer__ = "David Robillard" diff --git a/doc/lv2apply.1 b/doc/lv2apply.1 index f6b310f..6589049 100644 --- a/doc/lv2apply.1 +++ b/doc/lv2apply.1 @@ -1,8 +1,8 @@ -.\" # Copyright 2010-2022 David Robillard <d@drobilla.net> +.\" # Copyright 2010-2024 David Robillard <d@drobilla.net> .\" # SPDX-License-Identifier: ISC .Dd Nov 29, 2022 .Dt LV2APPLY 1 -.Os Lilv 0.24.22 +.Os Lilv 0.24.23 .Sh NAME .Nm lv2apply .Nd apply an LV2 plugin to an audio file diff --git a/doc/lv2bench.1 b/doc/lv2bench.1 index a3e8b2d..713f31d 100644 --- a/doc/lv2bench.1 +++ b/doc/lv2bench.1 @@ -1,8 +1,8 @@ -.\" # Copyright 2022 David Robillard <d@drobilla.net> +.\" # Copyright 2024 David Robillard <d@drobilla.net> .\" # SPDX-License-Identifier: ISC .Dd Nov 29, 2022 .Dt LV2BENCH 1 -.Os Lilv 0.24.22 +.Os Lilv 0.24.23 .Sh NAME .Nm lv2bench .Nd benchmark all installed and supported LV2 plugins diff --git a/doc/lv2info.1 b/doc/lv2info.1 index fbbb684..8380965 100644 --- a/doc/lv2info.1 +++ b/doc/lv2info.1 @@ -1,8 +1,8 @@ -.\" # Copyright 2009-2022 David Robillard <d@drobilla.net> +.\" # Copyright 2009-2024 David Robillard <d@drobilla.net> .\" # SPDX-License-Identifier: ISC .Dd Nov 29, 2022 .Dt LV2INFO 1 -.Os Lilv 0.24.22 +.Os Lilv 0.24.23 .Sh NAME .Nm lv2info .Nd print information about an installed LV2 plugin diff --git a/doc/lv2ls.1 b/doc/lv2ls.1 index 25d79f8..6f34041 100644 --- a/doc/lv2ls.1 +++ b/doc/lv2ls.1 @@ -1,8 +1,8 @@ -.\" # Copyright 2010-2022 David Robillard <d@drobilla.net> +.\" # Copyright 2010-2024 David Robillard <d@drobilla.net> .\" # SPDX-License-Identifier: ISC .Dd Nov 29, 2022 .Dt LV2LS 1 -.Os Lilv 0.24.22 +.Os Lilv 0.24.23 .Sh NAME .Nm lv2ls .Nd list all installed LV2 plugins diff --git a/meson.build b/meson.build index a72696b..43fff22 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -# Copyright 2021-2022 David Robillard <d@drobilla.net> +# Copyright 2021-2024 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC project( @@ -11,7 +11,7 @@ project( ], license: 'ISC', meson_version: '>= 0.56.0', - version: '0.24.22', + version: '0.24.23', ) lilv_src_root = meson.current_source_dir() diff --git a/src/lilv_config.h b/src/lilv_config.h index 2533384..2c00901 100644 --- a/src/lilv_config.h +++ b/src/lilv_config.h @@ -1,11 +1,11 @@ -// Copyright 2021 David Robillard <d@drobilla.net> +// Copyright 2021-2024 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC #ifndef LILV_CONFIG_H #define LILV_CONFIG_H // Define version unconditionally so a warning will catch a mismatch -#define LILV_VERSION "0.24.22" +#define LILV_VERSION "0.24.23" // Separator between entries in variables like PATH #ifndef LILV_PATH_SEP diff --git a/src/state.c b/src/state.c index c8e8f14..cc4d950 100644 --- a/src/state.c +++ b/src/state.c @@ -756,11 +756,15 @@ lilv_state_new_from_file(LilvWorld* world, return NULL; } - uint8_t* abs_path = (uint8_t*)zix_canonical_path(NULL, path); - SerdNode node = serd_node_new_file_uri(abs_path, NULL, NULL, true); - SerdEnv* env = serd_env_new(&node); - SordModel* model = sord_new(world->world, SORD_SPO, false); - SerdReader* reader = sord_new_reader(model, env, SERD_TURTLE, NULL); + uint8_t* const abs_path = (uint8_t*)zix_canonical_path(NULL, path); + if (!abs_path) { + return NULL; + } + + SerdNode node = serd_node_new_file_uri(abs_path, NULL, NULL, true); + SerdEnv* env = serd_env_new(&node); + SordModel* model = sord_new(world->world, SORD_SPO, false); + SerdReader* reader = sord_new_reader(model, env, SERD_TURTLE, NULL); serd_reader_read_file(reader, node.buf); diff --git a/test/test_state.c b/test/test_state.c index cb84fb4..3ab2148 100644 --- a/test/test_state.c +++ b/test/test_state.c @@ -1018,6 +1018,18 @@ test_bad_subject(void) } static void +test_missing_path(void) +{ + TestContext* const ctx = test_context_new(); + LilvState* const state = lilv_state_new_from_file( + ctx->env->world, &ctx->map, NULL, "/does/not/exist"); + + assert(!state); + + test_context_free(ctx); +} + +static void count_file(const char* path, const char* name, void* data) { (void)path; @@ -1105,6 +1117,7 @@ main(void) test_world_round_trip(); test_label_round_trip(); test_bad_subject(); + test_missing_path(); test_delete(); return 0; |