diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index 78daa9e8218966..8c86730d8bddde 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -29,7 +29,7 @@ CHIP_ERROR AutoCommissioner::SetCommissioningParameters(const CommissioningParam if (params.HasThreadOperationalDataset()) { ByteSpan dataset = params.GetThreadOperationalDataset().Value(); - if (dataset.size() > CommissioningParameters::kMaxCredentialsLen) + if (dataset.size() > CommissioningParameters::kMaxThreadDatasetLen) { return CHIP_ERROR_INVALID_ARGUMENT; }