提交 e9ea5d7f 编写于 作者: L ly0 提交者: LINGuanRen

fix asan report heap overflow: str has no ending

上级 2e4c947f
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册