TSG-3398 doh/pangu send log 时使用未初始化的内存

This commit is contained in:
luwenpeng
2020-09-25 17:46:41 +08:00
parent 736eaac1fb
commit ea56ecd8fb
2 changed files with 2 additions and 2 deletions

View File

@@ -332,7 +332,7 @@ int doh_send_log(struct doh_conf *handle, const struct tfe_http_session *http, c
cJSON_AddStringToObject(common_obj, "doh_version", app_proto[http->major_version]);
cJSON_AddStringToObject(common_obj, "common_schema_type", "DOH");
char opt_val[24];
char opt_val[24] = { 0 };
uint16_t opt_out_size;
struct tfe_cmsg *cmsg = tfe_stream_get0_cmsg(stream);
if (cmsg != NULL)

View File

@@ -118,7 +118,7 @@ int pangu_send_log(struct pangu_logger* handle, const struct pangu_log* log_msg)
cJSON_AddStringToObject(common_obj, "http_version", app_proto[http->major_version]);
cJSON_AddStringToObject(common_obj, "common_schema_type", "HTTP");
char opt_val[24]; uint16_t opt_out_size;
char opt_val[24] = { 0 }; uint16_t opt_out_size;
struct tfe_cmsg * cmsg = tfe_stream_get0_cmsg(log_msg->stream);
if (cmsg!=NULL)
{