From 689e880ec8f5269114747b832b67d211e5812b15 Mon Sep 17 00:00:00 2001 From: liuyao <54liuyao@163.com> Date: Mon, 21 Aug 2023 14:33:39 +0800 Subject: [PATCH] fix asan error --- source/libs/executor/src/scanoperator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 3d2eef66ea..37f1ea597d 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1986,7 +1986,10 @@ void streamScanOperatorDecode(void* pBuff, int32_t len, SStreamScanInfo* pInfo) } void* buf = pBuff; buf = decodeSTimeWindowAggSupp(buf, &pInfo->twAggSup); - int32_t tlen = len - ((char *)pBuff - (char *)buf); // fix windows compile error + int32_t tlen = len - encodeSTimeWindowAggSupp(NULL, &pInfo->twAggSup); + if (tlen == 0) { + return; + } void* pUpInfo = taosMemoryCalloc(1, sizeof(SUpdateInfo)); int32_t code = pInfo->stateStore.updateInfoDeserialize(buf, tlen, pUpInfo); -- GitLab