From a4c120ee28c070aa46017e2cb6610ace3b6afbb2 Mon Sep 17 00:00:00 2001 From: sima Date: Tue, 6 Aug 2024 17:58:38 +0800 Subject: [PATCH] fix:[TD-31276] check malloc result. --- source/libs/scalar/inc/filterInt.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/libs/scalar/inc/filterInt.h b/source/libs/scalar/inc/filterInt.h index ab04f06b02..1d7472e15d 100644 --- a/source/libs/scalar/inc/filterInt.h +++ b/source/libs/scalar/inc/filterInt.h @@ -481,6 +481,9 @@ struct SFilterInfo { #define FILTER_COPY_IDX(dst, src, n) \ do { \ *(dst) = taosMemoryMalloc(sizeof(uint32_t) * n); \ + if (NULL == *(dst)) { \ + FLT_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); \ + } \ (void)memcpy(*(dst), src, sizeof(uint32_t) * n); \ } while (0)