[vlc-devel] [PATCH 4/5] keystore: fail if keystore memory has option

Maxime ... mmeisson at outlook.fr
Tue Jul 30 13:01:39 CEST 2019


---
 modules/keystore/memory.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/keystore/memory.c b/modules/keystore/memory.c
index 4ad1208262..4ad6b9ad3e 100644
--- a/modules/keystore/memory.c
+++ b/modules/keystore/memory.c
@@ -154,13 +154,17 @@ Close(vlc_object_t *p_this)
 static int
 Open(vlc_keystore *p_keystore, const config_chain_t *config)
 {
+    if ( config != NULL )
+    {
+        msg_Err(p_keystore, "unknow option(s) given to keystore module");
+        return VLC_EGENERIC;
+    }
     vlc_keystore_sys *p_sys = calloc(1, sizeof(vlc_keystore_sys));
+
     if (!p_sys)
         return VLC_EGENERIC;
     p_keystore->p_sys = p_sys;
 
-    VLC_UNUSED(config); // No option to parse atm
-
     vlc_mutex_init(&p_keystore->p_sys->lock);
     p_keystore->pf_store = Store;
     p_keystore->pf_find = Find;
-- 
2.17.1



More information about the vlc-devel mailing list