From 1bce600a6f308b3bd836f85eb1cc62d3c93a5f35 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 21 Jun 2019 21:18:43 +0200 Subject: Refuse to store state properties with null keys --- test/test.lv2/test.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/test.lv2/test.c b/test/test.lv2/test.c index bf0f87b..c1cf4d7 100644 --- a/test/test.lv2/test.c +++ b/test/test.lv2/test.c @@ -213,6 +213,16 @@ save(LV2_Handle instance, return LV2_STATE_ERR_UNKNOWN; } + // Try to store with a null key (should fail) + if (!store(callback_data, + 0, + &urid2, + sizeof(uint32_t), + map_uri(plugin, LV2_ATOM__URID), + LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE)) { + return LV2_STATE_ERR_UNKNOWN; + } + store(callback_data, map_uri(plugin, "http://example.org/num-runs"), &plugin->num_runs, -- cgit v1.2.1