westonpace commented on a change in pull request #9100: URL: https://github.com/apache/arrow/pull/9100#discussion_r552044312
########## File path: cpp/src/arrow/util/trie.h ########## @@ -125,6 +126,9 @@ class ARROW_EXPORT Trie { int32_t Find(util::string_view s) const { const Node* node = &nodes_[0]; fast_index_type pos = 0; + if (s.length() > static_cast<size_t>(kMaxIndex)) { Review comment: @pitrou One small difference from your original patch. This changed from >= to >. Could you review that? My test of the boundary cases considered a string of length 2^n-1 as valid and so I either needed to remove that case or change the comparison (and I chose the latter). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org