wxMBConvStrictUTF8::FromWChar() didn't update the input length correctly when
encountering a surrogate while decoding UTF-16 and could read beyond the end
of the input buffer in this case.
Fix this by simply adjusting the input length when a surrogate is read.
Closes #13614.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69676
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
// skip the next char too as we decoded a surrogate
wp++;
+ if ( srcLen != wxNO_LEN )
+ srcLen--;
}
#else // wchar_t is UTF-32
code = *wp & 0x7fffffff;