diff --git a/src/core/common/tlvs.hpp b/src/core/common/tlvs.hpp index 264edd2e2..209c497d8 100644 --- a/src/core/common/tlvs.hpp +++ b/src/core/common/tlvs.hpp @@ -104,7 +104,7 @@ public: * @returns The total size include Type, Length, and Value fields. * */ - uint8_t GetSize(void) const { return sizeof(Tlv) + mLength; } + uint16_t GetSize(void) const { return sizeof(Tlv) + mLength; } /** * This method returns a pointer to the Value. diff --git a/src/core/meshcop/meshcop_tlvs.hpp b/src/core/meshcop/meshcop_tlvs.hpp index 07673be78..9259eb0d4 100644 --- a/src/core/meshcop/meshcop_tlvs.hpp +++ b/src/core/meshcop/meshcop_tlvs.hpp @@ -1336,7 +1336,7 @@ public: * @returns The total size of this entry (number of bytes). * */ - uint8_t GetSize(void) const { return sizeof(ChannelMaskEntry) + mMaskLength; } + uint16_t GetSize(void) const { return sizeof(ChannelMaskEntry) + mMaskLength; } /** * This method clears the bit corresponding to @p aChannel in ChannelMask.