Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9ab600e1
T
TDengine
项目概览
taosdata
/
TDengine
12 个月 前同步成功
通知
1180
Star
22014
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
9ab600e1
编写于
10月 20, 2022
作者:
D
dapan1121
提交者:
GitHub
10月 20, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17498 from taosdata/fix/coverity.pw
fix: fix coverity issues
上级
67ed0cf3
991da956
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
32 addition
and
0 deletion
+32
-0
source/dnode/vnode/src/vnd/vnodeQuery.c
source/dnode/vnode/src/vnd/vnodeQuery.c
+28
-0
source/libs/executor/src/dataInserter.c
source/libs/executor/src/dataInserter.c
+4
-0
未找到文件。
source/dnode/vnode/src/vnd/vnodeQuery.c
浏览文件 @
9ab600e1
...
@@ -285,15 +285,43 @@ int32_t vnodeGetBatchMeta(SVnode *pVnode, SRpcMsg *pMsg) {
...
@@ -285,15 +285,43 @@ int32_t vnodeGetBatchMeta(SVnode *pVnode, SRpcMsg *pMsg) {
}
}
for
(
int32_t
i
=
0
;
i
<
msgNum
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
msgNum
;
++
i
)
{
if
(
offset
>=
pMsg
->
contLen
)
{
qError
(
"vnode offset %d is bigger than contLen %d"
,
offset
,
pMsg
->
contLen
);
terrno
=
TSDB_CODE_MSG_NOT_PROCESSED
;
taosArrayDestroy
(
batchRsp
);
return
-
1
;
}
req
.
msgIdx
=
ntohl
(
*
(
int32_t
*
)((
char
*
)
pMsg
->
pCont
+
offset
));
req
.
msgIdx
=
ntohl
(
*
(
int32_t
*
)((
char
*
)
pMsg
->
pCont
+
offset
));
offset
+=
sizeof
(
req
.
msgIdx
);
offset
+=
sizeof
(
req
.
msgIdx
);
if
(
offset
>=
pMsg
->
contLen
)
{
qError
(
"vnode offset %d is bigger than contLen %d"
,
offset
,
pMsg
->
contLen
);
terrno
=
TSDB_CODE_MSG_NOT_PROCESSED
;
taosArrayDestroy
(
batchRsp
);
return
-
1
;
}
req
.
msgType
=
ntohl
(
*
(
int32_t
*
)((
char
*
)
pMsg
->
pCont
+
offset
));
req
.
msgType
=
ntohl
(
*
(
int32_t
*
)((
char
*
)
pMsg
->
pCont
+
offset
));
offset
+=
sizeof
(
req
.
msgType
);
offset
+=
sizeof
(
req
.
msgType
);
if
(
offset
>=
pMsg
->
contLen
)
{
qError
(
"vnode offset %d is bigger than contLen %d"
,
offset
,
pMsg
->
contLen
);
terrno
=
TSDB_CODE_MSG_NOT_PROCESSED
;
taosArrayDestroy
(
batchRsp
);
return
-
1
;
}
req
.
msgLen
=
ntohl
(
*
(
int32_t
*
)((
char
*
)
pMsg
->
pCont
+
offset
));
req
.
msgLen
=
ntohl
(
*
(
int32_t
*
)((
char
*
)
pMsg
->
pCont
+
offset
));
offset
+=
sizeof
(
req
.
msgLen
);
offset
+=
sizeof
(
req
.
msgLen
);
if
(
offset
>=
pMsg
->
contLen
)
{
qError
(
"vnode offset %d is bigger than contLen %d"
,
offset
,
pMsg
->
contLen
);
terrno
=
TSDB_CODE_MSG_NOT_PROCESSED
;
taosArrayDestroy
(
batchRsp
);
return
-
1
;
}
req
.
msg
=
(
char
*
)
pMsg
->
pCont
+
offset
;
req
.
msg
=
(
char
*
)
pMsg
->
pCont
+
offset
;
offset
+=
req
.
msgLen
;
offset
+=
req
.
msgLen
;
...
...
source/libs/executor/src/dataInserter.c
浏览文件 @
9ab600e1
...
@@ -329,6 +329,8 @@ int32_t createDataInserter(SDataSinkManager* pManager, const SDataSinkNode* pDat
...
@@ -329,6 +329,8 @@ int32_t createDataInserter(SDataSinkManager* pManager, const SDataSinkNode* pDat
}
}
if
(
pInserterNode
->
stableId
!=
suid
)
{
if
(
pInserterNode
->
stableId
!=
suid
)
{
destroyDataSinker
((
SDataSinkHandle
*
)
inserter
);
taosMemoryFree
(
inserter
);
terrno
=
TSDB_CODE_TDB_INVALID_TABLE_ID
;
terrno
=
TSDB_CODE_TDB_INVALID_TABLE_ID
;
return
terrno
;
return
terrno
;
}
}
...
@@ -336,6 +338,8 @@ int32_t createDataInserter(SDataSinkManager* pManager, const SDataSinkNode* pDat
...
@@ -336,6 +338,8 @@ int32_t createDataInserter(SDataSinkManager* pManager, const SDataSinkNode* pDat
inserter
->
pDataBlocks
=
taosArrayInit
(
1
,
POINTER_BYTES
);
inserter
->
pDataBlocks
=
taosArrayInit
(
1
,
POINTER_BYTES
);
taosThreadMutexInit
(
&
inserter
->
mutex
,
NULL
);
taosThreadMutexInit
(
&
inserter
->
mutex
,
NULL
);
if
(
NULL
==
inserter
->
pDataBlocks
)
{
if
(
NULL
==
inserter
->
pDataBlocks
)
{
destroyDataSinker
((
SDataSinkHandle
*
)
inserter
);
taosMemoryFree
(
inserter
);
terrno
=
TSDB_CODE_QRY_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_QRY_OUT_OF_MEMORY
;
return
TSDB_CODE_QRY_OUT_OF_MEMORY
;
return
TSDB_CODE_QRY_OUT_OF_MEMORY
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录