未验证 提交 d5bacb71 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

[TD-3369] <fix>: fix taosdemo invalid write valgrind reports. (#5496)

上级 7916c1df
......@@ -997,7 +997,7 @@ void rand_string(char *str, int size) {
if (size > 0) {
//--size;
int n;
for (n = 0; n < size; n++) {
for (n = 0; n < size - 1; n++) {
int key = rand_tinyint() % (int)(sizeof(charset) - 1);
str[n] = charset[key];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册