From ff492acbbfb620d2199aaa44f5646fc90d715e92 Mon Sep 17 00:00:00 2001 From: Huo Linhe Date: Thu, 24 Jun 2021 11:36:41 +0800 Subject: [PATCH] [TD-4872]: fix tasodemo buffer overflow with -O3 --- src/kit/taosdemo/taosdemo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 33ee2a9bc2..1bb057aa67 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -5103,7 +5103,7 @@ static int32_t generateStbDataTail( } else { retLen = getRowDataFromSample( data, - remainderBufLen, + remainderBufLen < MAX_DATA_SIZE ? remainderBufLen : MAX_DATA_SIZE, startTime + superTblInfo->timeStampStep * k, superTblInfo, pSamplePos); -- GitLab