Report invalid module name on decoder load
authorBert Vermeulen <bert@biot.com>
Thu, 17 Oct 2013 21:52:15 +0000 (23:52 +0200)
committerBert Vermeulen <bert@biot.com>
Thu, 17 Oct 2013 22:40:03 +0000 (00:40 +0200)
decoder.c

index 76f8682ad98a9d189287093511c5aa602f6f1027..01dcf0a823b6da56a798d646750e355bfdd3de52 100644 (file)
--- a/decoder.c
+++ b/decoder.c
@@ -252,6 +252,9 @@ SRD_API int srd_decoder_load(const char *module_name)
        struct srd_probe *p;
        GSList *l;
 
+       if (!module_name)
+               return SRD_ERR_ARG;
+
        srd_dbg("Loading protocol decoder '%s'.", module_name);
 
        py_basedec = py_method = py_attr = NULL;