Merge pull request #2692 from taosdata/hotfix/TD-936

coverity issue
This commit is contained in:
Shengliang Guan 2020-07-17 13:55:31 +08:00 committed by GitHub
commit 5457f14458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -239,7 +239,10 @@ char* strntolower(char *dst, const char *src, int32_t n) {
char quote = 0, *p = dst, c;
assert(dst != NULL);
if (n == 0) {
*p = 0;
return dst;
}
for (c = *src++; n-- > 0; c = *src++) {
if (esc) {
esc = 0;