Fix potential crash for Encoder.Convert (#20522)mono-6.12.0.107
commita22ed3f094e18f1f82e1c6cead28d872d3c57e40
authormonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 28 Oct 2020 10:54:00 +0000 (28 06:54 -0400)
committerGitHub <noreply@github.com>
Wed, 28 Oct 2020 10:54:00 +0000 (28 11:54 +0100)
tree968106406ab977121352e026e280c7d4df9abb93
parent970783731fccf269dcc3d2385bfd4adadf172196
Fix potential crash for Encoder.Convert (#20522)

GetByteCount will not return the right number of bytes needed, so GetBytes in Encoder.Convert will crash for some input

Backport of #20271.

Co-authored-by: jeffgoku <jeffreygoku@gmail.com>
mcs/class/I18N/CJK/GB18030Encoding.cs