From b606b97510f18bbdc08a139a47f243745f616023 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 30 Mar 2021 16:40:27 +0800 Subject: [PATCH] [td-225]fix a invalid read. --- src/client/src/tscUtil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index e899450261..d3136f6bd9 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -309,7 +309,7 @@ void tscSetResRawPtr(SSqlRes* pRes, SQueryInfo* pQueryInfo) { int32_t offset = 0; - for (int32_t i = 0; i < pRes->numOfCols; ++i) { + for (int32_t i = 0; i < pQueryInfo->fieldsInfo.numOfOutput; ++i) { SInternalField* pInfo = (SInternalField*)TARRAY_GET_ELEM(pQueryInfo->fieldsInfo.internalField, i); pRes->urow[i] = pRes->data + offset * pRes->numOfRows; -- GitLab