From 5cbece13867f455fa7c10ecf5f37ed7d6e3d3c55 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 26 Aug 2021 16:58:42 +0800 Subject: [PATCH] [TD-6356]: Fix the crash in TS-187 --- src/util/src/tutil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/src/tutil.c b/src/util/src/tutil.c index 866057818e..f8a97ff7cd 100644 --- a/src/util/src/tutil.c +++ b/src/util/src/tutil.c @@ -224,8 +224,7 @@ char* strntolower_s(char *dst, const char *src, int32_t n) { assert(dst != NULL); if (n == 0) { - *p = 0; - return dst; + return NULL; } while (n-- > 0) { -- GitLab