Fill trailing \0 for c metrics value (#26578)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/26589/head
congqixia 2023-08-23 18:42:24 +08:00 committed by GitHub
parent 809c7a8a0b
commit f625e3beb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -20,5 +20,6 @@ GetKnowhereMetrics() {
auto len = str.length();
char* res = (char*)malloc(len + 1);
memcpy(res, str.data(), len);
res[len] = '\0';
return res;
}