fix: query compatible with lower version messages

This commit is contained in:
Xiaoyu Wang 2023-02-13 15:25:00 +08:00
parent df4967614f
commit de92def988
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;
}