提交 a7186139 编写于 作者: S Shengliang Guan

fix: coverity issues

上级 e39a5c3f
......@@ -745,8 +745,7 @@ void taosSetSystemTimezone(const char *inTimezoneStr, char *outTimezoneStr, int8
if (inTimezoneStr == NULL || inTimezoneStr[0] == 0) return;
size_t len = strlen(inTimezoneStr);
char *buf = taosMemoryMalloc(len + 1);
memset(buf, 0, len + 1)
char *buf = taosMemoryCalloc(len + 1, 1);
for (int32_t i = 0; i < len; i++) {
if (inTimezoneStr[i] == ' ' || inTimezoneStr[i] == '(') {
buf[i] = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册