diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-06 16:28:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-06 16:28:41 +0300 |
commit | 6010ddb43d35d61864f7d139287f5ba18146c6bf (patch) | |
tree | 69218a597862318c3f3b80e642130700f0d8b144 /src/common | |
parent | 9d4ce2dc78fc0c7043948252ddb3ac45875df70a (diff) | |
download | hercules-6010ddb43d35d61864f7d139287f5ba18146c6bf.tar.gz hercules-6010ddb43d35d61864f7d139287f5ba18146c6bf.tar.bz2 hercules-6010ddb43d35d61864f7d139287f5ba18146c6bf.tar.xz hercules-6010ddb43d35d61864f7d139287f5ba18146c6bf.zip |
Fix memory corruption if plugin add command line parameter without help/description.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/core.c b/src/common/core.c index 201d4f5e8..ccd80c44b 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -230,7 +230,10 @@ bool cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, Cm data->name = aStrdup(name); data->shortname = shortname; data->func = func; - data->help = aStrdup(help); + if (help) + data->help = aStrdup(help); + else + data->help = NULL; data->options = options; return true; |