diff --git a/src/core/thread/meshcop_tlvs.hpp b/src/core/thread/meshcop_tlvs.hpp index 99f3477d8..03be430a9 100644 --- a/src/core/thread/meshcop_tlvs.hpp +++ b/src/core/thread/meshcop_tlvs.hpp @@ -1529,8 +1529,8 @@ public: ThreadError error = kThreadError_None; size_t len = aProvisioningUrl ? strnlen(aProvisioningUrl, kMaxLength + 1) : 0; - SetLength(static_cast(len)); VerifyOrExit(len <= kMaxLength, error = kThreadError_InvalidArgs); + SetLength(static_cast(len)); if (len > 0) { memcpy(mProvisioningUrl, aProvisioningUrl, len);