未验证 提交 2ab34405 编写于 作者: O openharmony_ci 提交者: Gitee

!259 fix bugs of use uninitialized mem in dlns_create

Merge pull request !259 from hhj/mem_overlap
......@@ -2456,10 +2456,10 @@ int dlns_create(Dl_namespace *ns,const char *search_path)
sys_length += search_length;
}
new_path = malloc(sys_length + 1);
new_path = (char *)malloc(sys_length + 1);
if (!new_path) return ENOMEM;
strcat(new_path, sys_path);
strcpy(new_path, sys_path);
if (search_path[0] != ':') {
strcat(new_path, ":");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册