diff --git a/src/share/config/ob_common_config.cpp b/src/share/config/ob_common_config.cpp index 495975b03de9ab57d349901913b6e7e1c9cedbf7..37e1fd46059aa47315127e9f4da6e4588dba7577 100644 --- a/src/share/config/ob_common_config.cpp +++ b/src/share/config/ob_common_config.cpp @@ -168,7 +168,7 @@ OB_DEF_DESERIALIZE(ObCommonConfig) ret = OB_ALLOCATE_MEMORY_FAILED; LOG_ERROR("ob tc malloc memory for buf fail", K(ret)); } else { - MEMSET(copy_buf, '\0', config_str_length + 1); + MEMSET(copy_buf, '\0', data_len + 1); MEMCPY(copy_buf, buf + pos, data_len); if (OB_FAIL(add_extra_config(copy_buf))) { LOG_ERROR("Read server config failed", K(ret));