]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1347] added comments
authorRazvan Becheriu <razvan@isc.org>
Fri, 14 Aug 2020 18:28:39 +0000 (21:28 +0300)
committerRazvan Becheriu <razvan@isc.org>
Fri, 14 Aug 2020 18:43:59 +0000 (18:43 +0000)
src/lib/util/strutil.cc
src/lib/util/strutil.h

index 286dde4f0ce2c17898af539d6cb7ebee0b080970..7eaabdc4d53ee6485613758592432dc61bd2dffd 100644 (file)
@@ -429,6 +429,9 @@ private:
 #endif
 };
 
+// @note The regex engine is implemented using recursion and can cause
+// stack overflow if the input data is too large. An arbitrary size of
+// 4096 should be enough for all cases.
 const uint32_t StringSanitizer::MAX_DATA_SIZE = 4096;
 
 StringSanitizer::StringSanitizer(const std::string& char_set,
index 3ea66b62d8e95f1fb48a82d69b46bef292401246..2005f7ab9c9f45dd630813b906df8c4b332afd63 100644 (file)
@@ -334,6 +334,10 @@ public:
     std::string scrub(const std::string& original);
 
     /// @brief The maximum size for regex parameters.
+    ///
+    /// @note The regex engine is implemented using recursion and can cause
+    /// stack overflow if the input data is too large. An arbitrary size of
+    /// 4096 should be enough for all cases.
     static const uint32_t MAX_DATA_SIZE;
 
 private: