http://bugs.winehq.org/show_bug.cgi?id=31085
--- Comment #4 from Dan Kegel dank@kegel.com 2012-07-01 23:04:22 CDT --- Ah, or maybe if(num > this->size-pos) num = this->size-pos; is the right way to clip it. I see MSVCP_basic_string_wchar_append_substr does it that way.
These other nine functions appear at first grep to have a similar problem, and I'll try to check them, too.
basic_string_char_replace_ch basic_string_char_replace_cstr_len basic_string_char_replace_substr basic_string_wchar_replace_ch basic_string_wchar_replace_cstr_len basic_string_wchar_replace_substr MSVCP_basic_string_char_compare_substr_substr MSVCP_basic_string_wchar_compare_substr_cstr_len MSVCP_basic_string_wchar_compare_substr_substr