mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-28 11:43:50 +00:00
Fix #1122
This commit is contained in:
@@ -201,6 +201,10 @@ read_jconf(const char *file)
|
||||
conf.user = to_string(value);
|
||||
} else if (strcmp(name, "plugin") == 0) {
|
||||
conf.plugin = to_string(value);
|
||||
if (strlen(conf.plugin) == 0) {
|
||||
ss_free(conf.plugin);
|
||||
conf.plugin = NULL;
|
||||
}
|
||||
} else if (strcmp(name, "plugin_opts") == 0) {
|
||||
conf.plugin_opts = to_string(value);
|
||||
} else if (strcmp(name, "fast_open") == 0) {
|
||||
|
||||
@@ -94,6 +94,9 @@ start_plugin(const char *plugin,
|
||||
if (plugin == NULL)
|
||||
return -1;
|
||||
|
||||
if (strlen(plugin) == 0)
|
||||
return 0;
|
||||
|
||||
size_t plugin_len = strlen(plugin);
|
||||
size_t cmd_len = plugin_len + CMD_RESRV_LEN;
|
||||
cmd = ss_malloc(cmd_len);
|
||||
|
||||
Reference in New Issue
Block a user