!78 Modify Pointer

Merge pull request !78 from 嗯 umason/ljy_master
This commit is contained in:
openharmony_ci 2023-07-13 08:34:00 +00:00 committed by Gitee
commit bb6c0d9c37
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 0 deletions

View File

@ -466,6 +466,9 @@ private:
inline bool HasExpectBuffer(const uint32_t expectLen) const
{
if (buffer_== nullptr) {
return false;
}
return buffer_->size() >= cursor_ && buffer_->size() - cursor_ >= expectLen;
}

View File

@ -20,6 +20,9 @@ namespace TLVUtil {
template<>
bool CountBufferSize(const std::shared_ptr<UnifiedRecord> &input, TLVObject &data)
{
if (input == nullptr) {
return false;
}
data.Count(input->GetType());
data.Count(input->GetUid());
auto type = input->GetType();