Merge pull request #19953 from taosdata/fix/main_bugfix_wxy

fix: query compatible with lower version messages
This commit is contained in:
Xiaoyu Wang 2023-02-14 09:36:40 +08:00 committed by GitHub
commit fcd1732514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -315,6 +315,11 @@ static int32_t tlvDecodeImpl(STlv* pTlv, void* pValue, int32_t len) {
}
static int32_t tlvDecodeValueImpl(STlvDecoder* pDecoder, void* pValue, int32_t len) {
// compatible with lower version messages
if (pDecoder->bufSize == pDecoder->offset) {
memset(pValue, 0, len);
return TSDB_CODE_SUCCESS;
}
if (len > pDecoder->bufSize - pDecoder->offset) {
return TSDB_CODE_FAILED;
}