Don't read beyond the end of input buffer when decoding UTF-16.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Nov 2011 11:23:44 +0000 (11:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Nov 2011 11:23:44 +0000 (11:23 +0000)
commit041e6050fdfa232472d7505b842d845d37dcb6de
treed0c0f323ee5d6ba07faa4c0857644ab0013cb887
parent64b91e2d40215fed25f4cc530162983dc24b2028
Don't read beyond the end of input buffer when decoding UTF-16.

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
src/common/strconv.cpp