🐞 fix(improve robustness, check input para):
This commit is contained in:
@@ -152,6 +152,7 @@ struct plugin_manager_schema *plugin_manager_init(struct stellar *st, const char
|
||||
|
||||
void plugin_manager_exit(struct plugin_manager_schema *plug_mgr)
|
||||
{
|
||||
if(plug_mgr==NULL)return;
|
||||
struct plugin_specific *p=NULL;
|
||||
if (plug_mgr->plugin_load_specs_array)
|
||||
{
|
||||
|
||||
@@ -428,6 +428,8 @@ static void on_sess_free(struct session *sess, void *sess_ctx, void *plugin_ctx)
|
||||
|
||||
static void on_sess_msg(struct session *sess, int topic_id, const void *msg, void *sess_ctx, void *plugin_ctx)
|
||||
{
|
||||
if(msg==NULL)return;// session closing, return directly
|
||||
|
||||
char buffer[1024] = {0};
|
||||
struct packet *pkt = (struct packet *)msg;
|
||||
struct plugin_ctx *ctx = (struct plugin_ctx *)plugin_ctx;
|
||||
|
||||
Reference in New Issue
Block a user