id summary reporter owner description type status milestone component version severity resolution keywords cc 11536 string_ref::substr length overflow bibmaster@… Marshall Clow "basic_string_ref::substr returns invalid object in some cases: {{{#!C++ string_ref s1(""hello""); string_ref s2 = s1.substr(0, string_ref::npos - 1); // EXPECT s2.size() <= s1.size() }}} version with overflow check: {{{#!C++ basic_string_ref substr(size_type pos, size_type n=npos) const { ... // add overflow check: pos + n < n if ( n == npos || pos + n > size() || pos + n < n ) n = size () - pos; ... }}}" Bugs closed To Be Determined utility Problem fixed