summaryrefslogtreecommitdiff
path: root/decoder.c
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2013-10-17 23:52:15 +0200
committerBert Vermeulen <bert@biot.com>2013-10-18 00:40:03 +0200
commit8a01468302ed915f6efd6933836c27e60a019100 (patch)
tree7fe23c5d13f0858662697c5baa7afcf251b7fa9b /decoder.c
parent9b9ff99983bba5f06093002e6cafd5bfd632b65d (diff)
downloadlibsigrokdecode-8a01468302ed915f6efd6933836c27e60a019100.tar.gz
libsigrokdecode-8a01468302ed915f6efd6933836c27e60a019100.zip
Report invalid module name on decoder load
Diffstat (limited to 'decoder.c')
-rw-r--r--decoder.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/decoder.c b/decoder.c
index 76f8682..01dcf0a 100644
--- 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;