From 1d2f938a3089cb5db965fa749fba103bf7e7146b Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Tue, 5 Aug 2025 21:14:45 +0800 Subject: [PATCH] add null terminator after fc_itoa --- src/shared_func.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared_func.c b/src/shared_func.c index 50a2329..7c075c3 100644 --- a/src/shared_func.c +++ b/src/shared_func.c @@ -3234,6 +3234,7 @@ const char *int2str(const int n, char *buff, const bool thousands_separator) { int len; len = fc_itoa(n, buff); + *(buff + len) = '\0'; if (thousands_separator) { add_thousands_separator(buff, len); @@ -3245,6 +3246,7 @@ const char *long2str(const int64_t n, char *buff, const bool thousands_separator { int len; len = fc_itoa(n, buff); + *(buff + len) = '\0'; if (thousands_separator) { add_thousands_separator(buff, len);