summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--src/state.c9
2 files changed, 11 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index f799662..becaafd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,10 @@
lilv (0.24.23) unstable; urgency=medium
+ * Avoid overriding state features passed by the host
* Fix null dereference when trying to load state from a missing file
* Fix potential null dereferences and conversion warnings
- -- David Robillard <d@drobilla.net> Tue, 09 Jan 2024 22:28:10 +0000
+ -- David Robillard <d@drobilla.net> Sat, 20 Jan 2024 22:28:18 +0000
lilv (0.24.22) stable; urgency=medium
diff --git a/src/state.c b/src/state.c
index 91f65ad..0ed5715 100644
--- a/src/state.c
+++ b/src/state.c
@@ -378,6 +378,15 @@ add_features(const LV2_Feature* const* features,
{
size_t n_features = 0;
for (; features && features[n_features]; ++n_features) {
+ if (!strcmp(features[n_features]->URI, LV2_STATE__mapPath)) {
+ map = NULL;
+ }
+ if (!strcmp(features[n_features]->URI, LV2_STATE__makePath)) {
+ make = NULL;
+ }
+ if (!strcmp(features[n_features]->URI, LV2_STATE__freePath)) {
+ free = NULL;
+ }
}
const LV2_Feature** ret =