stmt2/bind tags: fail with null var tag length
This commit is contained in:
parent
94d76ffcd2
commit
ad56719d9b
|
@ -499,6 +499,10 @@ int32_t qBindStmtTagsValue2(void* pBlock, void* boundTags, int64_t suid, const c
|
||||||
SSchema* pTagSchema = &pSchema[tags->pColIndex[c]];
|
SSchema* pTagSchema = &pSchema[tags->pColIndex[c]];
|
||||||
int32_t colLen = pTagSchema->bytes;
|
int32_t colLen = pTagSchema->bytes;
|
||||||
if (IS_VAR_DATA_TYPE(pTagSchema->type)) {
|
if (IS_VAR_DATA_TYPE(pTagSchema->type)) {
|
||||||
|
if (!bind[c].length) {
|
||||||
|
code = buildInvalidOperationMsg(&pBuf, "var tag length is null");
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
colLen = bind[c].length[0];
|
colLen = bind[c].length[0];
|
||||||
if ((colLen + VARSTR_HEADER_SIZE) > pTagSchema->bytes) {
|
if ((colLen + VARSTR_HEADER_SIZE) > pTagSchema->bytes) {
|
||||||
code = buildInvalidOperationMsg(&pBuf, "tag length is too big");
|
code = buildInvalidOperationMsg(&pBuf, "tag length is too big");
|
||||||
|
|
Loading…
Reference in New Issue