From: Bert Vermeulen Date: Thu, 17 Oct 2013 21:52:15 +0000 (+0200) Subject: Report invalid module name on decoder load X-Git-Tag: libsigrokdecode-0.3.0~256 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8a01468302ed915f6efd6933836c27e60a019100;p=libsigrokdecode.git Report invalid module name on decoder load --- 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;