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 --- src/state.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/state.c b/src/state.c index 9b44c42..ac1468c 100644 --- a/src/state.c +++ b/src/state.c @@ -193,6 +193,10 @@ store_callback(LV2_State_Handle handle, { LilvState* const state = (LilvState*)handle; + if (!key) { + return LV2_STATE_ERR_UNKNOWN; // TODO: Add status for bad arguments + } + if (find_property((const LilvState*)handle, key)) { return LV2_STATE_ERR_UNKNOWN; // TODO: Add status for duplicate keys } -- cgit v1.2.1