From ccd0cc82a48c833e42095f4880e6c223c208c34d Mon Sep 17 00:00:00 2001 From: zhengchao Date: Sat, 8 Dec 2018 17:41:25 +0600 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BB=8Etableinfo=E4=B8=AD?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E6=97=A7=E7=89=88=E6=9C=ACplugin=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E6=97=B6=E9=80=A0=E6=88=90=E7=9A=84=E5=86=99=E8=B6=8A?= =?UTF-8?q?=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_rule.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 3fe7c84..a0e91fb 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -601,7 +601,7 @@ int _read_integer_arrary(char* string, int *array, int size) } return i; } - +#define COLUMN_PLUGIN_DESCR_JSON 4 int read_plugin_table_description(const char* line, struct Maat_table_desc* p) { int i=0,ret=0; @@ -610,15 +610,18 @@ int read_plugin_table_description(const char* line, struct Maat_table_desc* p) char* copy_line=NULL, *plug_info=NULL; struct plugin_table_desc* plugin_desc=&(p->plugin); copy_line=_maat_strdup(line); - ret=get_column_pos(copy_line, 4, &offset, &len); + ret=get_column_pos(copy_line, COLUMN_PLUGIN_DESCR_JSON, &offset, &len); if(i<0) { goto error_out; } - copy_line[offset+len+1]='\0'; + if(offset+lenvalid_flag_column)); if(ret==0||ret==EOF)