diff --git a/lib/config/configitembuilder.cpp b/lib/config/configitembuilder.cpp index 470afd303..6de6af556 100644 --- a/lib/config/configitembuilder.cpp +++ b/lib/config/configitembuilder.cpp @@ -96,6 +96,15 @@ ConfigItem::Ptr ConfigItemBuilder::Compile() << "Object name of type '" << m_Type->GetName() << "' contains leading/trailing whitespace.\n" << oss.str(); } + if (m_Name.GetLength() > 255) { + std::ostringstream oss; + ShowCodeLocation(oss, m_DebugInfo, false); + + Log(LogWarning, "config") + << "Object name of type '" << m_Type->GetName() << "' is too long (length: " << m_Name.GetLength() + << ", max: 255).\n" << oss.str(); + } + std::vector > exprs; Array::Ptr templateArray = new Array({ m_Name });