From fb9057648bf4849f8e772110e0f1c8748b01b6fa Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 8 Jun 2020 09:26:57 +0000 Subject: [PATCH] [TD_543] fix coverity scan, cid:267767 --- src/plugins/http/src/httpUtil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/http/src/httpUtil.c b/src/plugins/http/src/httpUtil.c index 77fc399272..b91b89e21c 100644 --- a/src/plugins/http/src/httpUtil.c +++ b/src/plugins/http/src/httpUtil.c @@ -32,12 +32,12 @@ bool httpCheckUsedbSql(char *sql) { void httpTimeToString(time_t t, char *buf, int buflen) { memset(buf, 0, (size_t)buflen); - char ts[30] = {0}; + char ts[32] = {0}; struct tm *ptm; time_t tt = t / 1000; ptm = localtime(&tt); - strftime(ts, 64, "%Y-%m-%d %H:%M:%S", ptm); + strftime(ts, 31, "%Y-%m-%d %H:%M:%S", ptm); sprintf(buf, "%s.%03ld", ts, t % 1000); } -- GitLab